-
-
Save matthew-piziak/bd37fde51cd56ea3febbb9d7b2089750 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This is the implementation of the ‘derivation’ builtin function. | |
It's actually a wrapper around the ‘derivationStrict’ primop. */ | |
drvAttrs @ { outputs ? [ "out" ], ... }: | |
let | |
strict = derivationStrict drvAttrs; | |
commonAttrs = drvAttrs // (builtins.listToAttrs outputsList) // | |
{ all = map (x: x.value) outputsList; | |
inherit drvAttrs; | |
}; | |
outputToAttrListElement = outputName: | |
{ name = outputName; | |
value = commonAttrs // { | |
outPath = builtins.getAttr outputName strict; -- <- this is 18:9 | |
drvPath = strict.drvPath; | |
type = "derivation"; | |
inherit outputName; | |
}; | |
}; | |
outputsList = map outputToAttrListElement outputs; | |
in (builtins.head outputsList).value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment