Change-Id: Ia23bb1ce5121ec2224f7c3daa439a56917f064c5 Reviewed-on: https://cl.snix.dev/c/snix/+/30306 Tested-by: besadii Reviewed-by: Florian Klink <flokli@flokli.de>
30 lines
925 B
Bash
30 lines
925 B
Bash
# 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
|
|
watch_file snix/shell.nix
|
|
|
|
# Activate snix development shell
|
|
# FUTUREWORK: merge together (#65)
|
|
use nix -A snix.shell
|
|
|
|
# https://github.com/direnv/direnv/pull/1409
|
|
unset TMP TMPDIR TEMP TEMPDIR
|