about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-03-08T11·06+0300
committertazjin <tazjin@tvl.su>2023-03-08T16·59+0000
commite43569d31d3b2de8f73af0d437a9c0a0b1f490c0 (patch)
tree62b7b52a5ad025b06fe9b415c4b14e2d388fe599
parent252d8b10dbb9bcda496afae1a420d8b115d58175 (diff)
fix: make depot-gcroot derivation a plain list of out paths r/5901
This just creates a text file (similar to the propagated deps file)
which lists the outpaths of all targets.

It's unclear why the previous fix didn't work, but it was done solely
based on docs not on reading code. In general we don't really need a
setup hook though and nobody remembers why that was the solution we
used anyways, so lets remove it.

Change-Id: I2a945925f4fa56b272aa44c29229b6a1aefa80e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8228
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
-rw-r--r--default.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/default.nix b/default.nix
index c8d1af9d5472..832cc2448105 100644
--- a/default.nix
+++ b/default.nix
@@ -115,10 +115,9 @@ readTree.fix (self: (readDepot {
   });
 
   # Derivation that gcroots all depot targets.
-  ci.gcroot = with self.third_party.nixpkgs; makeSetupHook
-    {
-      name = "depot-gcroot";
-      depsTargetTargetPropagated = self.ci.targets;
-    }
-    emptyFile;
+  ci.gcroot = with self.third_party.nixpkgs; writeText "depot-gcroot"
+    (builtins.concatStringsSep "\n"
+      (lib.flatten
+        (map (p: map (o: p.${o}) p.outputs or [ ]) # list all outputs of each drv
+          self.ci.targets)));
 })