19 stdenv.mkDerivation (finalAttrs: {
23 # Using source archive to avoid fetching Git submodules.
24 # Git repo: https://github.com/mono/libgdiplus
26 url = "https://download.mono-project.com/sources/libgdiplus/libgdiplus-${finalAttrs.version}.tar.gz";
27 hash = "sha256-+lP9ETlw3s0RUliQT1uBWZ2j6o3V9EECBQSppOYFq4Q=";
31 # Fix pkg-config lookup when cross-compiling.
32 ./configure-pkg-config.patch
35 NIX_LDFLAGS = "-lgif";
42 hardeningDisable = [ "format" ];
49 configureFlags = lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
51 enableParallelBuilding = true;
63 ] ++ lib.optional stdenv.hostPlatform.isDarwin Carbon;
65 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
66 ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
74 description = "Mono library that provides a GDI+-compatible API on non-Windows operating systems";
75 homepage = "https://www.mono-project.com/docs/gui/libgdiplus/";
76 platforms = platforms.unix;
77 license = licenses.mit;