about summary refs log tree commit diff
path: root/.envrc
diff options
context:
space:
mode:
Diffstat (limited to '.envrc')
-rw-r--r--.envrc15
1 files changed, 13 insertions, 2 deletions
diff --git a/.envrc b/.envrc
index 71a05d58b7..1f15539fb2 100644
--- a/.envrc
+++ b/.envrc
@@ -1,7 +1,18 @@
+# Create a gcroot that keeps all third_party.sources alive
+nix-build --out-link .gcroots/sources -E '
+with import ./. {};
+third_party.nixpkgs.writeText "depot-3p-sources.txt" (
+  toString (
+    builtins.map (s: s.outPath or null) (
+      builtins.attrValues third_party.sources
+    )
+  )
+)'
+
 # Configure the local PATH to contain tools which are fetched ad-hoc
 # from Nix.
-
-out=$(nix-build -A tools.depot-deps --no-out-link)
+out=$(nix-build -A tools.depot-deps --out-link .gcroots/depot-deps)
 PATH_add "$out/bin"
 
 watch_file tools/depot-deps.nix
+watch_file third_party/sources/sources.json