sphinxbase: Add flag to play with multiple outputs

svn path=/nixpkgs/trunk/; revision=28999
This commit is contained in:
Shea Levy 2011-09-03 20:01:06 +00:00
parent 04e4bf68c8
commit 1fe20228b9

View File

@ -1,6 +1,11 @@
{ stdenv, fetchurl, bison, pkgconfig }: { stdenv
, fetchurl
, bison
, pkgconfig
, multipleOutputs ? false #Uses incomplete features of nix!
}:
stdenv.mkDerivation rec { stdenv.mkDerivation (rec {
name = "sphinxbase-0.7"; name = "sphinxbase-0.7";
src = fetchurl { src = fetchurl {
@ -16,4 +21,15 @@ stdenv.mkDerivation rec {
license = "free-non-copyleft"; license = "free-non-copyleft";
maintainers = [ stdenv.lib.maintainers.shlevy ]; maintainers = [ stdenv.lib.maintainers.shlevy ];
}; };
} } // (stdenv.lib.optionalAttrs multipleOutputs {
outputs = [ "out" "lib" "headers" ];
postInstall = ''
ensureDir $lib
cp -av $out/lib* $lib
ensureDir $headers
cp -av $out/include $headers
'';
}))