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

49 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, pkg-config, glib, cairo, Carbon, fontconfig
, libtiff, giflib, libjpeg, libpng
, libXrender, libexif, autoreconfHook, fetchpatch }:
stdenv.mkDerivation rec {
pname = "libgdiplus";
2020-05-05 16:34:41 +00:00
version = "6.0.5";
src = fetchFromGitHub {
owner = "mono";
repo = "libgdiplus";
rev = version;
2020-05-05 16:34:41 +00:00
sha256 = "1387lgph5r17viv3rkf5hbksdn435njzmra7s17q0nzk2mkkm68c";
};
NIX_LDFLAGS = "-lgif";
outputs = [ "out" "dev" ];
hardeningDisable = [ "format" ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
configureFlags = lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
2019-10-27 21:20:00 +00:00
2020-08-25 05:41:25 +00:00
enableParallelBuilding = true;
buildInputs =
[ glib cairo fontconfig libtiff giflib
libjpeg libpng libXrender libexif
2016-01-24 03:49:50 +00:00
]
++ lib.optional stdenv.isDarwin Carbon;
postInstall = lib.optionalString stdenv.isDarwin ''
2017-02-07 19:00:48 +00:00
ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
'';
checkPhase = ''
make check -w
'';
meta = with lib; {
2018-10-17 18:31:22 +00:00
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 18:31:22 +00:00
platforms = platforms.unix;
license = licenses.mit;
};
}