2012-01-08 20:50:06 +01:00
|
|
|
{ stdenv, fetchurl, zlib, xz }:
|
|
|
|
|
2014-03-12 06:34:42 +01:00
|
|
|
assert !(stdenv ? cross) -> zlib != null;
|
2012-01-08 20:50:06 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-03-13 22:32:17 +01:00
|
|
|
name = "libpng-1.2.51";
|
2012-01-08 20:50:06 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/libpng/${name}.tar.xz";
|
2014-03-13 22:32:17 +01:00
|
|
|
sha256 = "0jkdlmnvn72jwm94dp98pznm9fy7alvcr2zpfh2dgbr2n09vimy7";
|
2012-01-08 20:50:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ zlib ];
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ xz ];
|
2012-01-08 20:50:06 +01:00
|
|
|
|
|
|
|
passthru = { inherit zlib; };
|
|
|
|
|
2014-03-12 06:34:42 +01:00
|
|
|
crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") {
|
|
|
|
propagatedBuildInputs = [];
|
|
|
|
passthru = {};
|
|
|
|
};
|
|
|
|
|
2014-04-01 01:37:10 +02:00
|
|
|
configureFlags = "--enable-static";
|
|
|
|
|
2012-01-08 20:50:06 +01:00
|
|
|
meta = {
|
|
|
|
description = "The official reference implementation for the PNG file format";
|
|
|
|
homepage = http://www.libpng.org/pub/png/libpng.html;
|
|
|
|
license = "free-non-copyleft"; # http://www.libpng.org/pub/png/src/libpng-LICENSE.txt
|
|
|
|
};
|
|
|
|
}
|