nixpkgs/pkgs/development/libraries/libgdiplus/default.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, pkg-config, glib, cairo, Carbon, fontconfig
, libtiff, giflib, libjpeg, libpng
, libXrender, libexif, autoreconfHook, fetchpatch }:
stdenv.mkDerivation rec {
pname = "libgdiplus";
2020-05-05 17:34:41 +01:00
version = "6.0.5";
src = fetchFromGitHub {
owner = "mono";
repo = "libgdiplus";
rev = version;
2020-05-05 17:34:41 +01:00
sha256 = "1387lgph5r17viv3rkf5hbksdn435njzmra7s17q0nzk2mkkm68c";
};
NIX_LDFLAGS = "-lgif";
outputs = [ "out" "dev" ];
hardeningDisable = [ "format" ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
2019-11-09 19:31:37 +00:00
configureFlags = stdenv.lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
2019-10-27 21:20:00 +00:00
2020-08-25 06:41:25 +01:00
enableParallelBuilding = true;
buildInputs =
[ glib cairo fontconfig libtiff giflib
libjpeg libpng libXrender libexif
2016-01-24 03:49:50 +00:00
]
++ stdenv.lib.optional stdenv.isDarwin Carbon;
2017-02-07 19:00:48 +00:00
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
'';
checkPhase = ''
make check -w
'';
2018-10-17 19:31:22 +01:00
meta = with stdenv.lib; {
description = "Mono library that provides a GDI+-compatible API on non-Windows operating systems";
homepage = "https://www.mono-project.com/docs/gui/libgdiplus/";
2018-10-17 19:31:22 +01:00
platforms = platforms.unix;
license = licenses.mit;
};
}