1 { lib, stdenv, fetchFromGitHub, pkg-config, glib, cairo, Carbon, fontconfig
2 , libtiff, giflib, libjpeg, libpng
3 , libXrender, libexif, autoreconfHook, fetchpatch }:
5 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
13 sha256 = "1387lgph5r17viv3rkf5hbksdn435njzmra7s17q0nzk2mkkm68c";
16 NIX_LDFLAGS = "-lgif";
18 outputs = [ "out" "dev" ];
20 hardeningDisable = [ "format" ];
22 nativeBuildInputs = [ autoreconfHook pkg-config ];
24 configureFlags = lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
26 enableParallelBuilding = true;
29 [ glib cairo fontconfig libtiff giflib
30 libjpeg libpng libXrender libexif
32 ++ lib.optional stdenv.isDarwin Carbon;
34 postInstall = lib.optionalString stdenv.isDarwin ''
35 ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
43 description = "Mono library that provides a GDI+-compatible API on non-Windows operating systems";
44 homepage = "https://www.mono-project.com/docs/gui/libgdiplus/";
45 platforms = platforms.unix;
46 license = licenses.mit;