Allow channels to be usefully imported by other nix expressions.

This commit is contained in:
Shea Levy 2013-12-05 12:16:25 -05:00 committed by Graham Christensen
parent 4013e83e3f
commit 70eb67fe5b
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C

View file

@ -32,6 +32,10 @@ sub process {
let
maybeStorePath = if builtins ? langVersion && builtins.lessThan 1 builtins.langVersion
then builtins.storePath
else x: x;
mkFakeDerivation = attrs: outputs:
let
outputNames = builtins.attrNames outputs;
@ -44,7 +48,7 @@ let
{ name = outputName;
value = common // {
inherit outputName;
outPath = builtins.getAttr outputName outputs;
outPath = maybeStorePath (builtins.getAttr outputName outputs);
};
};
outputsList = map outputToAttrListElement outputNames;