Fix toolchain
parent
45e1613787
commit
f5c6692c0d
|
@ -3,15 +3,17 @@
|
||||||
|
|
||||||
exec >&2
|
exec >&2
|
||||||
|
|
||||||
|
pfx=${2%.rw}
|
||||||
|
|
||||||
redo-ifchange ../flake.nix ../flake.lock || true
|
redo-ifchange ../flake.nix ../flake.lock || true
|
||||||
|
|
||||||
resolve_flake() {
|
resolve_flake() {
|
||||||
STORE_PATH=$(nix flake info --json --inputs-from .. "$2" | jq -r .path)
|
STORE_PATH=$(nix flake info --json --inputs-from .. "$pfx" | jq -r .path)
|
||||||
|
|
||||||
# Do this after 'info' to avoid unnecessary network activity. nix flake
|
# Do this after 'info' to avoid unnecessary network activity. nix flake
|
||||||
# archive may try to download a flake although the store path is available.
|
# archive may try to download a flake although the store path is available.
|
||||||
if [ ! -d "$STORE_PATH" ]; then
|
if [ ! -d "$STORE_PATH" ]; then
|
||||||
nix flake archive --inputs-from .. "$2"
|
nix flake archive --inputs-from .. "$pfx"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue