Files
nixpkgs/pkgs/by-name/li/libgdiplus/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

79 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchzip,
pkg-config,
glib,
cairo,
fontconfig,
libtiff,
giflib,
libjpeg,
libpng,
libXrender,
libexif,
autoreconfHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libgdiplus";
version = "6.1";
# Using source archive to avoid fetching Git submodules.
# Git repo: https://github.com/mono/libgdiplus
src = fetchzip {
url = "https://download.mono-project.com/sources/libgdiplus/libgdiplus-${finalAttrs.version}.tar.gz";
hash = "sha256-+lP9ETlw3s0RUliQT1uBWZ2j6o3V9EECBQSppOYFq4Q=";
};
patches = [
# Fix pkg-config lookup when cross-compiling.
./configure-pkg-config.patch
];
NIX_LDFLAGS = "-lgif";
outputs = [
"out"
"dev"
];
hardeningDisable = [ "format" ];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
configureFlags = lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
enableParallelBuilding = true;
buildInputs = [
glib
cairo
fontconfig
libtiff
giflib
libjpeg
libpng
libXrender
libexif
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
'';
checkPhase = ''
make check -w
'';
meta = with 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;
};
})