From 8d275a1dc91e305117c3f10d549bb3d96af68deb Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Sun, 29 May 2022 23:16:44 +0300 Subject: [PATCH] fix: expose all builder outputs (#162) * fix: expose all builder outputs * fix: don't recursively update into derivations --- src/default.nix | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/default.nix b/src/default.nix index dd151d5f..02859561 100644 --- a/src/default.nix +++ b/src/default.nix @@ -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 {