2023-05-24 13:37:59 +00:00
|
|
|
{ lib, stdenv, fetchurl, zlib, installShellFiles }:
|
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" ];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace $makefile \
|
|
|
|
--replace "gcc" "$CC"
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makefile = "Makefile.unx";
|
|
|
|
makeFlags = [ "ZPATH=${zlib.static}/lib" ];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-05-24 13:37:59 +00:00
|
|
|
runHook preInstall
|
|
|
|
install -Dm555 -t $out/bin/ pngcheck
|
|
|
|
installManPage $pname.1
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://pmt.sourceforge.net/pngcrush";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|