2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "pngcheck";
|
|
|
|
version = "3.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "mirror://sourceforge/png-mng/pngcheck-${version}.tar.gz";
|
2021-02-13 14:23:35 +00:00
|
|
|
sha256 = "sha256-DX4mLyQRb93yhHqM61yS2fXybvtC6f/2PsK7dnYTHKc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace Makefile.unx --replace "gcc" "clang"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makefile = "Makefile.unx";
|
|
|
|
makeFlags = [ "ZPATH=${zlib.static}/lib" ];
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin/
|
|
|
|
cp pngcheck $out/bin/pngcheck
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://pmt.sourceforge.net/pngcrush";
|
|
|
|
description = "Verifies the integrity of PNG, JNG and MNG files";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.free;
|
2022-04-15 01:41:22 +00:00
|
|
|
platforms = platforms.unix;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ starcraft66 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|