nixpkgs/pkgs/development/libraries/libgdiplus/default.nix
2020-08-25 07:41:25 +02:00

49 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, pkgconfig, 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 pkgconfig ];
configureFlags = stdenv.lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
enableParallelBuilding = true;
buildInputs =
[ glib cairo fontconfig libtiff giflib
libjpeg libpng libXrender libexif
]
++ stdenv.lib.optional stdenv.isDarwin Carbon;
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
'';
checkPhase = ''
make check -w
'';
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/";
platforms = platforms.unix;
license = licenses.mit;
};
}