1 { lib, stdenv, fetchurl, zlib }:
3 assert stdenv.hostPlatform == stdenv.buildPlatform -> zlib != null;
5 stdenv.mkDerivation rec {
10 url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz";
11 sha256 = "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl";
14 outputs = [ "out" "dev" "man" ];
16 propagatedBuildInputs = [ zlib ];
18 passthru = { inherit zlib; };
20 configureFlags = [ "--enable-static" ];
22 postInstall = ''mv "$out/bin" "$dev/bin"'';
25 description = "The official reference implementation for the PNG file format";
26 homepage = "http://www.libpng.org/pub/png/libpng.html";
27 license = licenses.libpng;
30 platforms = platforms.unix;