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
48 lines
1.0 KiB
Nix
48 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
fetchpatch2,
|
|
libpng,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pngcrush";
|
|
version = "1.8.13";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/pmt/pngcrush-${version}-nolib.tar.xz";
|
|
sha256 = "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch2 {
|
|
url = "https://salsa.debian.org/debian/pngcrush/-/raw/b4856b56fbc28252103cc14d156baddd564ca880/debian/patches/ignore_PNG_IGNORE_ADLER32.patch";
|
|
hash = "sha256-pFON/NUJiXMe9GETptgNltWa0izlby6P/fLsG1abz3g=";
|
|
})
|
|
];
|
|
|
|
makeFlags = [
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
"LD=${stdenv.cc.targetPrefix}cc"
|
|
]; # gcc and/or clang compat
|
|
|
|
configurePhase = ''
|
|
runHook preConfigure
|
|
|
|
sed -i s,/usr,$out, Makefile
|
|
|
|
runHook postConfigure
|
|
'';
|
|
|
|
buildInputs = [ libpng ];
|
|
|
|
meta = {
|
|
homepage = "http://pmt.sourceforge.net/pngcrush";
|
|
description = "PNG optimizer";
|
|
license = lib.licenses.free;
|
|
platforms = with lib.platforms; linux ++ darwin;
|
|
mainProgram = "pngcrush";
|
|
};
|
|
}
|