Change-Id: I6edd4aff7b46d8f3f75462d1576b3f4ffd7f16b8 Reviewed-on: https://cl.snix.dev/c/snix/+/30304 Reviewed-by: Florian Klink <flokli@flokli.de> Tested-by: besadii
27 lines
849 B
Bash
27 lines
849 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
|