diff options
author | sterni <sternenseemann@systemli.org> | 2022-09-13T20·18+0200 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2022-09-15T11·27+0000 |
commit | 16da548f93c9e8e9d4771240bb4a1bf14b9665aa (patch) | |
tree | 61a7a2e4f558a4923636960b4cb6462d49764e65 /.envrc | |
parent | ee1f62f5e5e91ff990277ce6b58cb53d74f9b3cf (diff) |
feat(.envrc): gcroot third_party.sources r/4856
This is a bit slower than I'd like, but acceptable. Change-Id: I419b3c49201540de9d0ade1c6c2ac97758d8a811 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6576 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to '.envrc')
-rw-r--r-- | .envrc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/.envrc b/.envrc index 71a05d58b773..1f15539fb2d4 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 |