From 3c109095de0eca89cef4e53f988d3a0a1ba37c4e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 4 Feb 2025 15:24:50 +0100 Subject: [PATCH] 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. --- tests/functional/flakes/flake-in-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/flakes/flake-in-submodule.sh b/tests/functional/flakes/flake-in-submodule.sh index f98c19aa8..fc732a7e2 100755 --- a/tests/functional/flakes/flake-in-submodule.sh +++ b/tests/functional/flakes/flake-in-submodule.sh @@ -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