3
0
Fork 0

Make tmp/<input> target work with non-flake inputs

This commit is contained in:
Michael Raitza 2020-12-18 11:48:10 +01:00
parent f5c6692c0d
commit 3b0ccb1ea4

View file

@ -8,7 +8,7 @@ pfx=${2%.rw}
redo-ifchange ../flake.nix ../flake.lock || true
resolve_flake() {
STORE_PATH=$(nix flake info --json --inputs-from .. "$pfx" | jq -r .path)
STORE_PATH=$(nix flake archive .. --dry-run --json | jq -r .inputs.\"$pfx\".path)
# Do this after 'info' to avoid unnecessary network activity. nix flake
# archive may try to download a flake although the store path is available.