Skip to content

Commit

Permalink
lib.extendDerivation: Fix interaction between output selection and ov…
Browse files Browse the repository at this point in the history
…errideAttrs
  • Loading branch information
roberth authored and Artturin committed Jan 20, 2023
1 parent bff126f commit 5b2f597
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/customisation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,14 @@ rec {
outputSpecified = true;
drvPath = assert condition; drv.${outputName}.drvPath;
outPath = assert condition; drv.${outputName}.outPath;
};
} //
# TODO: give the derivation control over the outputs.
# `overrideAttrs` may not be the only attribute that needs
# updating when switching outputs.
lib.optionalAttrs (passthru?overrideAttrs) {
# TODO: also add overrideAttrs when overrideAttrs is not custom, e.g. when not splicing.
overrideAttrs = f: (passthru.overrideAttrs f).${outputName};
};
};

outputsList = map outputToAttrListElement outputs;
Expand Down

0 comments on commit 5b2f597

Please sign in to comment.