diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-03-14 12:15:58 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-04-07 15:59:44 +0200 |
commit | 2995439003a6473fc6531d09900e183b0d5de425 (patch) | |
tree | 6eb88bcd570fe2e4a0e3ed31b2d716888631695b /pkgs/build-support/buildenv | |
parent | 3342f717da7f660b4695f09034abc175a14fda24 (diff) | |
download | nixpkgs-2995439003a6473fc6531d09900e183b0d5de425.tar nixpkgs-2995439003a6473fc6531d09900e183b0d5de425.tar.gz nixpkgs-2995439003a6473fc6531d09900e183b0d5de425.tar.bz2 nixpkgs-2995439003a6473fc6531d09900e183b0d5de425.tar.lz nixpkgs-2995439003a6473fc6531d09900e183b0d5de425.tar.xz nixpkgs-2995439003a6473fc6531d09900e183b0d5de425.tar.zst nixpkgs-2995439003a6473fc6531d09900e183b0d5de425.zip |
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
Diffstat (limited to 'pkgs/build-support/buildenv')
-rw-r--r-- | pkgs/build-support/buildenv/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix index 8b8c3e3cbc2..10f7c69c3aa 100644 --- a/pkgs/build-support/buildenv/default.nix +++ b/pkgs/build-support/buildenv/default.nix @@ -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; |