1 { lib, stdenv, fetchurl, zlib }:
3 assert stdenv.hostPlatform == stdenv.buildPlatform -> zlib != null;
5 stdenv.mkDerivation rec {
6 name = "libpng-1.2.59";
9 url = "mirror://sourceforge/libpng/${name}.tar.xz";
10 sha256 = "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl";
13 outputs = [ "out" "dev" "man" ];
15 propagatedBuildInputs = [ zlib ];
17 passthru = { inherit zlib; };
19 configureFlags = [ "--enable-static" ];
21 postInstall = ''mv "$out/bin" "$dev/bin"'';
24 description = "The official reference implementation for the PNG file format";
25 homepage = "http://www.libpng.org/pub/png/libpng.html";
26 license = licenses.libpng;
29 platforms = platforms.unix;