forked from mirrors/nixpkgs
libpng: Use multiple outputs
This commit is contained in:
parent
4a3ababb74
commit
c64a1332ec
|
@ -9,7 +9,7 @@ let whenPatched = stdenv.lib.optionalString apngSupport;
|
|||
sha256 = "0fy7p197ilr9phwqqk9h91s1mc28r6gj0w2ilrw5liagi71z75j1";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation (rec {
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "libpng" + whenPatched "-apng" + "-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
|
@ -17,6 +17,14 @@ in stdenv.mkDerivation (rec {
|
|||
sha256 = "1pljkqjqgyz8c32w8fipd9f0v2gcyhah2ypp0h7ya1r1q85sk5qw";
|
||||
};
|
||||
|
||||
outputs = [ "dev" "out" "man" ];
|
||||
|
||||
preConfigure = "export bin=$dev";
|
||||
|
||||
postPatch = stdenv.lib.optionalString apngSupport ''
|
||||
gunzip < ${patch_src} | patch -Np1
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ zlib ];
|
||||
|
||||
doCheck = true;
|
||||
|
@ -29,10 +37,4 @@ in stdenv.mkDerivation (rec {
|
|||
license = "free-non-copyleft"; # http://www.libpng.org/pub/png/src/libpng-LICENSE.txt
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
} // stdenv.lib.optionalAttrs apngSupport {
|
||||
|
||||
postPatch = ''
|
||||
gunzip < ${patch_src} | patch -Np1
|
||||
'';
|
||||
|
||||
})
|
||||
}
|
Loading…
Reference in a new issue