mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
Merge pull request #9593 from B4dM4n/fix-path-like-flake-query
Fix query parsing for path-like flakes
This commit is contained in:
commit
0dfa66d120
2 changed files with 9 additions and 1 deletions
|
@ -90,7 +90,7 @@ std::pair<FlakeRef, std::string> parsePathFlakeRefWithFragment(
|
|||
fragment = percentDecode(url.substr(fragmentStart+1));
|
||||
}
|
||||
if (pathEnd != std::string::npos && fragmentStart != std::string::npos) {
|
||||
query = decodeQuery(url.substr(pathEnd+1, fragmentStart));
|
||||
query = decodeQuery(url.substr(pathEnd+1, fragmentStart-pathEnd-1));
|
||||
}
|
||||
|
||||
if (baseDir) {
|
||||
|
|
|
@ -193,6 +193,14 @@ nix build -o "$TEST_ROOT/result" flake1
|
|||
nix build -o "$TEST_ROOT/result" "$flake1Dir"
|
||||
nix build -o "$TEST_ROOT/result" "git+file://$flake1Dir"
|
||||
|
||||
# Test explicit packages.default.
|
||||
nix build -o "$TEST_ROOT/result" "$flake1Dir#default"
|
||||
nix build -o "$TEST_ROOT/result" "git+file://$flake1Dir#default"
|
||||
|
||||
# Test explicit packages.default with query.
|
||||
nix build -o "$TEST_ROOT/result" "$flake1Dir?ref=HEAD#default"
|
||||
nix build -o "$TEST_ROOT/result" "git+file://$flake1Dir?ref=HEAD#default"
|
||||
|
||||
# Check that store symlinks inside a flake are not interpreted as flakes.
|
||||
nix build -o "$flake1Dir/result" "git+file://$flake1Dir"
|
||||
nix path-info "$flake1Dir/result"
|
||||
|
|
Loading…
Reference in a new issue