nixpkgs/pkgs/development/libraries/libpng/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, zlib, apngSupport ? true }:
assert zlib != null;
let
2022-12-29 22:48:40 +00:00
patchVersion = "1.6.39";
patch_src = fetchurl {
url = "mirror://sourceforge/libpng-apng/libpng-${patchVersion}-apng.patch.gz";
2022-12-29 22:48:40 +00:00
hash = "sha256-SsS26roAzeISxI22XLlCkQc/68oixcef2ocJFQLoDP0=";
};
whenPatched = lib.optionalString apngSupport;
2013-08-23 07:54:38 +00:00
in stdenv.mkDerivation rec {
pname = "libpng" + whenPatched "-apng";
2022-12-29 22:48:40 +00:00
version = "1.6.39";
src = fetchurl {
url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz";
2022-12-29 22:48:40 +00:00
hash = "sha256-H0aWznC07l+F8eFiPcEimyEAKfpLeu5XPfPiunsDaTc=";
};
2014-08-26 23:14:09 +00:00
postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1";
outputs = [ "out" "dev" "man" ];
2016-07-09 13:42:42 +00:00
outputBin = "dev";
2013-08-23 07:54:38 +00:00
propagatedBuildInputs = [ zlib ];
2018-12-03 12:18:31 +00:00
doCheck = true;
passthru = { inherit zlib; };
meta = with lib; {
description = "The official reference implementation for the PNG file format" + whenPatched " with animation patch";
homepage = "http://www.libpng.org/pub/png/libpng.html";
2022-12-29 22:48:40 +00:00
changelog = "https://github.com/glennrp/libpng/blob/v1.6.39/CHANGES";
2018-12-03 12:18:31 +00:00
license = licenses.libpng2;
platforms = platforms.all;
2022-12-29 22:48:40 +00:00
maintainers = with maintainers; [ vcunat ];
};
}