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

44 lines
1.2 KiB
Nix
Raw Normal View History

2016-01-24 03:49:50 +00:00
{ stdenv, fetchurl, pkgconfig, glib, cairo, Carbon, fontconfig
, libtiff, giflib, libjpeg, libpng
, libXrender, libexif }:
stdenv.mkDerivation rec {
name = "libgdiplus-2.10.9";
src = fetchurl {
url = "https://download.mono-project.com/sources/libgdiplus/${name}.tar.bz2";
sha256 = "0klnbly2q0yx5p0l5z8da9lhqsjj9xqj06kdw2v7rnms4z1vdpkd";
};
NIX_LDFLAGS = "-lgif";
patches =
[ (fetchurl {
url = "https://raw.github.com/MagicGroup/MagicSpecLib/master/libgdiplus/libgdiplus-2.10.1-libpng15.patch";
sha256 = "130r0jm065pjvbz5dkx96w37vj1wqc8fakmi2znribs14g0bl65f";
})
./giflib.patch
];
patchFlags = "-p0";
hardeningDisable = [ "format" ];
buildInputs =
[ pkgconfig 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
'';
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/;
platforms = platforms.unix;
license = licenses.mit;
};
}