summary refs log tree commit diff
path: root/lib/customisation.nix
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2021-09-30 17:29:55 +0200
committerpennae <github@quasiparticle.net>2021-09-30 17:34:07 +0200
commit9b3b8f74bb974dcb7ecbfe2730296217532e3a42 (patch)
tree71768aebec312871baddea75a26675cf47542dbd /lib/customisation.nix
parentbdbded8cc1a2b8e324e8c8cfb9617aa6616b4ac6 (diff)
downloadnixpkgs-9b3b8f74bb974dcb7ecbfe2730296217532e3a42.tar
nixpkgs-9b3b8f74bb974dcb7ecbfe2730296217532e3a42.tar.gz
nixpkgs-9b3b8f74bb974dcb7ecbfe2730296217532e3a42.tar.bz2
nixpkgs-9b3b8f74bb974dcb7ecbfe2730296217532e3a42.tar.lz
nixpkgs-9b3b8f74bb974dcb7ecbfe2730296217532e3a42.tar.xz
nixpkgs-9b3b8f74bb974dcb7ecbfe2730296217532e3a42.tar.zst
nixpkgs-9b3b8f74bb974dcb7ecbfe2730296217532e3a42.zip
fix nested calls to extendDerivation
if extendDerivation is called on something that already had extendDerivation
called on it (eg a mkDerivation result) the second call will set
outputUnspecified=true on every output by way of propagating attributes of the
full derivation to the individual outputs. this in turn causes buildEnv--and
thus nix-shell and environment.systemPackages--to install every output of such a
derivation even when only a specific output was requested, which renders the
point of multiple outputs moot. this happens in python modules (see #139756),
though it seems that tcl and possibly others should also be affected.
Diffstat (limited to 'lib/customisation.nix')
-rw-r--r--lib/customisation.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix
index c17cb0d0f8e..a794b673d70 100644
--- a/lib/customisation.nix
+++ b/lib/customisation.nix
@@ -145,7 +145,8 @@ rec {
     let
       outputs = drv.outputs or [ "out" ];
 
-      commonAttrs = drv // (builtins.listToAttrs outputsList) //
+      commonAttrs = (removeAttrs drv [ "outputUnspecified" ]) //
+        (builtins.listToAttrs outputsList) //
         ({ all = map (x: x.value) outputsList; }) // passthru;
 
       outputToAttrListElement = outputName: