depot/third_party/nixpkgs/pkgs/development/libraries/libgdiplus/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

48 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, pkg-config, glib, cairo, Carbon, fontconfig
, libtiff, giflib, libjpeg, libpng
, libXrender, libexif, autoreconfHook, fetchpatch }:
stdenv.mkDerivation rec {
pname = "libgdiplus";
version = "6.0.5";
src = fetchFromGitHub {
owner = "mono";
repo = "libgdiplus";
rev = version;
sha256 = "1387lgph5r17viv3rkf5hbksdn435njzmra7s17q0nzk2mkkm68c";
};
NIX_LDFLAGS = "-lgif";
outputs = [ "out" "dev" ];
hardeningDisable = [ "format" ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
configureFlags = lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
enableParallelBuilding = true;
buildInputs =
[ glib cairo fontconfig libtiff giflib
libjpeg libpng libXrender libexif
]
++ lib.optional stdenv.isDarwin Carbon;
postInstall = lib.optionalString stdenv.isDarwin ''
ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
'';
checkPhase = ''
make check -w
'';
meta = with lib; {
description = "Mono library that provides a GDI+-compatible API on non-Windows operating systems";
homepage = "https://www.mono-project.com/docs/gui/libgdiplus/";
platforms = platforms.unix;
license = licenses.mit;
};
}