2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, glib, cairo, Carbon, fontconfig
|
2018-07-21 02:44:44 +02:00
|
|
|
, libtiff, giflib, libjpeg, libpng
|
2018-03-09 19:28:28 +01:00
|
|
|
, libXrender, libexif, autoreconfHook, fetchpatch }:
|
2012-01-04 14:55:54 +01:00
|
|
|
|
2019-09-22 09:38:09 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libgdiplus";
|
2020-05-05 18:34:41 +02:00
|
|
|
version = "6.0.5";
|
2012-01-04 14:55:54 +01:00
|
|
|
|
2018-03-05 14:39:01 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mono";
|
|
|
|
repo = "libgdiplus";
|
2019-09-22 09:38:09 +02:00
|
|
|
rev = version;
|
2020-05-05 18:34:41 +02:00
|
|
|
sha256 = "1387lgph5r17viv3rkf5hbksdn435njzmra7s17q0nzk2mkkm68c";
|
2012-01-04 14:55:54 +01:00
|
|
|
};
|
|
|
|
|
2013-12-07 13:32:57 +01:00
|
|
|
NIX_LDFLAGS = "-lgif";
|
|
|
|
|
2019-09-20 13:28:34 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2018-05-28 22:53:19 +02:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2018-03-05 14:39:01 +01:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
configureFlags = lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
|
2019-10-27 22:20:00 +01:00
|
|
|
|
2020-08-25 07:41:25 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2012-03-06 14:49:37 +01:00
|
|
|
buildInputs =
|
2018-03-05 14:39:01 +01:00
|
|
|
[ glib cairo fontconfig libtiff giflib
|
2012-03-06 14:49:37 +01:00
|
|
|
libjpeg libpng libXrender libexif
|
2016-01-24 04:49:50 +01:00
|
|
|
]
|
2021-01-21 18:00:13 +01:00
|
|
|
++ lib.optional stdenv.isDarwin Carbon;
|
2016-08-02 18:06:29 +02:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2017-02-07 20:00:48 +01:00
|
|
|
ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
|
|
|
|
'';
|
|
|
|
|
2018-03-09 19:28:28 +01:00
|
|
|
checkPhase = ''
|
|
|
|
make check -w
|
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2018-10-17 20:31:22 +02:00
|
|
|
description = "Mono library that provides a GDI+-compatible API on non-Windows operating systems";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.mono-project.com/docs/gui/libgdiplus/";
|
2018-10-17 20:31:22 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
2016-08-02 18:06:29 +02:00
|
|
|
};
|
2012-01-04 14:55:54 +01:00
|
|
|
}
|