Merge pull request #562 from grahamc/141-redux

Allow channels to be usefully imported by other nix expressions.
This commit is contained in:
Eelco Dolstra 2018-05-25 18:30:15 +02:00 committed by GitHub
commit 7f6d52f4c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;