fix: expose all builder outputs (#162)

* fix: expose all builder outputs

* fix: don't recursively update into derivations
This commit is contained in:
Yusuf Bera Ertan 2022-05-29 23:16:44 +03:00 committed by GitHub
parent c83389fd43
commit 8d275a1dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -551,20 +551,16 @@
(outputs.packages or {});
};
projectOutputs =
l.map
(proj: outputsForProject proj)
translatedProjects;
projectOutputs = l.map outputsForProject translatedProjects;
mergedOutputs =
l.foldl'
(all: outputs:
all
// {
packages = all.packages or {} // outputs.packages;
})
{}
projectOutputs;
mergedOutputs = let
isNotDrvAttrs = val:
l.isAttrs val && (val.type or "") != "derivation";
recursiveUpdateUntilDrv =
l.recursiveUpdateUntil
(_: l: r: !(isNotDrvAttrs l && isNotDrvAttrs r));
in
l.foldl' recursiveUpdateUntilDrv {} projectOutputs;
in
mergedOutputs;
in {