2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, libpng }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "pngcrush";
|
|
|
|
version = "1.8.13";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "mirror://sourceforge/pmt/pngcrush-${version}-nolib.tar.xz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv";
|
|
|
|
};
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" ]; # gcc and/or clang compat
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
sed -i s,/usr,$out, Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ libpng ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://pmt.sourceforge.net/pngcrush";
|
|
|
|
description = "A PNG optimizer";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.free;
|
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "pngcrush";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|