buildEnv: respect meta.outputsToInstall

As a result `systemPackages` now also respect it.
Only nix-env remains and that has a PR filed:
    https://github.com/NixOS/nix/pull/815
This commit is contained in:
Vladimír Čunát
2016-04-07 15:59:44 +02:00
parent 3342f717da
commit 2995439003
3 changed files with 10 additions and 6 deletions
+6 -1
View File
@@ -48,7 +48,12 @@ runCommand name
meta pathsToLink extraPrefix postBuild buildInputs;
pkgs = builtins.toJSON (map (drv: {
paths =
[ drv ]
# First add the usual output(s): respect if user has chosen explicitly,
# and otherwise use `meta.outputsToInstall` (guaranteed to exist by stdenv).
(if (drv.outputUnspecified or false)
then map (outName: drv.${outName}) drv.meta.outputsToInstall
else [ drv ])
# Add any extra outputs specified by the caller of `buildEnv`.
++ lib.filter (p: p!=null)
(builtins.map (outName: drv.${outName} or null) extraOutputsToLink);
priority = drv.meta.priority or 5;