Skip to content

Commit

Permalink
Don't absolutize 'git+file:' in parseURLFlakeRef()
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Jan 16, 2025
1 parent 40bb5ec commit 938f0f4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/libflake/flake/flakeref.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ std::optional<std::pair<FlakeRef, std::string>> parseURLFlakeRef(
try {
auto parsed = parseURL(url);
if (baseDir
&& (parsed.scheme == "path" || parsed.scheme == "git+file")
&& parsed.scheme == "path"
&& !isAbsolute(parsed.path))
parsed.path = absPath(parsed.path, *baseDir);
return fromParsedURL(fetchSettings, std::move(parsed), isFlake);
Expand Down
1 change: 0 additions & 1 deletion tests/functional/flakes/flakes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ nix build -o "$TEST_ROOT/result" "$flake1Dir"
nix build -o "$TEST_ROOT/result" "git+file://$flake1Dir"
(cd "$flake1Dir" && nix build -o "$TEST_ROOT/result" ".")
(cd "$flake1Dir" && nix build -o "$TEST_ROOT/result" "path:.")
(cd "$flake1Dir" && nix build -o "$TEST_ROOT/result" "git+file:.")

# Test explicit packages.default.
nix build -o "$TEST_ROOT/result" "$flake1Dir#default"
Expand Down

0 comments on commit 938f0f4

Please sign in to comment.