diff options
| author | pennae <github@quasiparticle.net> | 2021-09-30 17:29:55 +0200 |
|---|---|---|
| committer | pennae <github@quasiparticle.net> | 2021-09-30 17:34:07 +0200 |
| commit | 9b3b8f74bb974dcb7ecbfe2730296217532e3a42 (patch) | |
| tree | 71768aebec312871baddea75a26675cf47542dbd /lib/customisation.nix | |
| parent | Merge pull request #139599 from fabaff/elkm1-lib (diff) | |
| download | nixpkgs-9b3b8f74bb974dcb7ecbfe2730296217532e3a42.tar.gz | |
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.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix index c17cb0d0f8e5..a794b673d70c 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: |
