mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
lib.extendDerivation: Fix interaction between output selection and overrideAttrs
This commit is contained in:
parent
bff126ffbc
commit
5b2f597b11
1 changed files with 8 additions and 1 deletions
|
@ -213,7 +213,14 @@ rec {
|
||||||
outputSpecified = true;
|
outputSpecified = true;
|
||||||
drvPath = assert condition; drv.${outputName}.drvPath;
|
drvPath = assert condition; drv.${outputName}.drvPath;
|
||||||
outPath = assert condition; drv.${outputName}.outPath;
|
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;
|
outputsList = map outputToAttrListElement outputs;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue