python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / libpng / default.nix
blob2293dfc00a0c7be773b0d8ae102c6961b93dda86
1 { lib, stdenv, fetchurl, zlib, apngSupport ? true }:
3 assert zlib != null;
5 let
6   patchVersion = "1.6.37";
7   patch_src = fetchurl {
8     url = "mirror://sourceforge/libpng-apng/libpng-${patchVersion}-apng.patch.gz";
9     sha256 = "1dh0250mw9b2hx7cdmnb2blk7ddl49n6vx8zz7jdmiwxy38v4fw2";
10   };
11   whenPatched = lib.optionalString apngSupport;
13 in stdenv.mkDerivation rec {
14   pname = "libpng" + whenPatched "-apng";
15   version = "1.6.37";
17   src = fetchurl {
18     url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz";
19     sha256 = "1jl8in381z0128vgxnvn33nln6hzckl7l7j9nqvkaf1m9n1p0pjh";
20   };
21   postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1";
23   outputs = [ "out" "dev" "man" ];
24   outputBin = "dev";
26   propagatedBuildInputs = [ zlib ];
28   doCheck = true;
30   passthru = { inherit zlib; };
32   meta = with lib; {
33     description = "The official reference implementation for the PNG file format" + whenPatched " with animation patch";
34     homepage = "http://www.libpng.org/pub/png/libpng.html";
35     license = licenses.libpng2;
36     platforms = platforms.all;
37     maintainers = [ maintainers.vcunat ];
38   };