2015-07-30 11:47:50 +00:00
|
|
|
{ stdenv, fetchurl, zlib }:
|
2012-01-08 19:50:06 +00:00
|
|
|
|
2014-03-12 05:34:42 +00:00
|
|
|
assert !(stdenv ? cross) -> zlib != null;
|
2012-01-08 19:50:06 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-07-08 08:55:00 +00:00
|
|
|
name = "libpng-1.2.56";
|
2012-01-08 19:50:06 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/libpng/${name}.tar.xz";
|
2016-07-08 08:55:00 +00:00
|
|
|
sha256 = "1ghd03p353x0vi4dk83n1nlldg11w7vqdk3f99rkgfb82ic59ki4";
|
2012-01-08 19:50:06 +00:00
|
|
|
};
|
|
|
|
|
2015-10-17 21:16:42 +00:00
|
|
|
outputs = [ "dev" "out" "man" ];
|
|
|
|
|
2012-01-08 19:50:06 +00:00
|
|
|
propagatedBuildInputs = [ zlib ];
|
|
|
|
|
|
|
|
passthru = { inherit zlib; };
|
|
|
|
|
2014-03-12 05:34:42 +00:00
|
|
|
crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") {
|
|
|
|
propagatedBuildInputs = [];
|
|
|
|
passthru = {};
|
|
|
|
};
|
|
|
|
|
2014-03-31 23:37:10 +00:00
|
|
|
configureFlags = "--enable-static";
|
|
|
|
|
2015-10-17 21:16:42 +00:00
|
|
|
postInstall = ''mv "$out/bin" "$dev/bin"'';
|
|
|
|
|
2015-11-17 11:56:08 +00:00
|
|
|
meta = with stdenv.lib; {
|
2012-01-08 19:50:06 +00:00
|
|
|
description = "The official reference implementation for the PNG file format";
|
|
|
|
homepage = http://www.libpng.org/pub/png/libpng.html;
|
2015-11-17 11:56:08 +00:00
|
|
|
license = licenses.libpng;
|
|
|
|
maintainers = [ maintainers.fuuzetsu ];
|
2014-09-30 09:07:09 +00:00
|
|
|
branch = "1.2";
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = platforms.unix;
|
2012-01-08 19:50:06 +00:00
|
|
|
};
|
|
|
|
}
|