2021-01-15 09:19:50 +00:00
|
|
|
{ lib, stdenv, fetchurl, zlib }:
|
2014-12-01 16:05:20 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-12 18:41:54 +00:00
|
|
|
pname = "pngcheck";
|
|
|
|
version = "3.0.2";
|
2014-12-01 16:05:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-12 18:41:54 +00:00
|
|
|
url = "mirror://sourceforge/png-mng/pngcheck-${version}.tar.gz";
|
2021-02-05 14:48:13 +00:00
|
|
|
sha256 = "sha256-DX4mLyQRb93yhHqM61yS2fXybvtC6f/2PsK7dnYTHKc=";
|
2014-12-01 16:05:20 +00:00
|
|
|
};
|
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2014-12-01 16:05:20 +00:00
|
|
|
|
2021-11-15 06:58:37 +00:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace Makefile.unx --replace "gcc" "clang"
|
|
|
|
'';
|
|
|
|
|
2014-12-01 16:05:20 +00:00
|
|
|
makefile = "Makefile.unx";
|
2019-10-27 13:03:25 +00:00
|
|
|
makeFlags = [ "ZPATH=${zlib.static}/lib" ];
|
2014-12-01 16:05:20 +00:00
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin/
|
|
|
|
cp pngcheck $out/bin/pngcheck
|
|
|
|
'';
|
|
|
|
|
2021-11-15 06:58:37 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://pmt.sourceforge.net/pngcrush";
|
2014-12-01 16:05:20 +00:00
|
|
|
description = "Verifies the integrity of PNG, JNG and MNG files";
|
2021-11-15 06:58:37 +00:00
|
|
|
license = licenses.free;
|
|
|
|
platforms = with platforms; [ unix ];
|
2021-11-15 06:59:06 +00:00
|
|
|
maintainers = with maintainers; [ starcraft66 ];
|
2014-12-01 16:05:20 +00:00
|
|
|
};
|
|
|
|
}
|