diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/attrsets.nix | 2 | ||||
-rw-r--r-- | lib/customisation.nix | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 31fddc59e20e..812521ce6d1c 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -487,7 +487,7 @@ rec { => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev" */ getOutput = output: pkg: - if pkg.outputUnspecified or false + if ! pkg ? outputSpecified || ! pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg; diff --git a/lib/customisation.nix b/lib/customisation.nix index a794b673d70c..234a528527d3 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -145,14 +145,14 @@ rec { let outputs = drv.outputs or [ "out" ]; - commonAttrs = (removeAttrs drv [ "outputUnspecified" ]) // - (builtins.listToAttrs outputsList) // + commonAttrs = drv // (builtins.listToAttrs outputsList) // ({ all = map (x: x.value) outputsList; }) // passthru; outputToAttrListElement = outputName: { name = outputName; value = commonAttrs // { inherit (drv.${outputName}) type outputName; + outputSpecified = true; drvPath = assert condition; drv.${outputName}.drvPath; outPath = assert condition; drv.${outputName}.outPath; }; @@ -160,7 +160,6 @@ rec { outputsList = map outputToAttrListElement outputs; in commonAttrs // { - outputUnspecified = true; drvPath = assert condition; drv.drvPath; outPath = assert condition; drv.outPath; }; |