1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Use 'nix flake prefetch' to get the store path of a flake

Future-proofing for when 'nix flake metadata' won't return a store
path anymore.
This commit is contained in:
Eelco Dolstra 2025-02-04 15:24:50 +01:00
parent 5c6785e0c1
commit 3c109095de

View file

@ -74,7 +74,7 @@ EOF
git -C "$rootRepo" add flake.nix
git -C "$rootRepo" commit -m "Add flake.nix"
storePath=$(nix flake metadata --json "$rootRepo?submodules=1" | jq -r .path)
storePath=$(nix flake prefetch --json "$rootRepo?submodules=1" | jq -r .storePath)
[[ -e "$storePath/submodule" ]]
# The root repo may use the submodule repo as an input