about summary refs log tree commit diff
path: root/.envrc
blob: edebaae71261d63acf2bf4d4499415e7612f2548 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Create a gcroot that keeps all third_party.sources alive
nix-build --show-trace --out-link .gcroots/sources -E '
with import ./. {};
third_party.nixpkgs.writeText "depot-3p-sources.txt" (
  toString (
    builtins.map (s: s.outPath or null) (
      # Only gcroot sources that are explicitly marked using
      # niv modify --attribute gcroot=true <source>
      builtins.filter (source: source.gcroot or false) (
        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 --out-link .gcroots/depot-deps)
PATH_add "$out/bin"

watch_file tools/depot-deps.nix
watch_file third_party/sources/sources.json