mirror of
https://github.com/NixOS/nix
synced 2025-07-12 06:35:08 +02:00
Interpret absolute paths relative to the root FS rather than the current flake
This commit is contained in:
parent
e2353b9b45
commit
0402dd0298
4 changed files with 27 additions and 3 deletions
17
tests/flakes/absolute-paths.sh
Normal file
17
tests/flakes/absolute-paths.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
source ./common.sh
|
||||
|
||||
requireGit
|
||||
|
||||
flake1Dir=$TEST_ROOT/flake1
|
||||
flake2Dir=$TEST_ROOT/flake2
|
||||
|
||||
createGitRepo $flake1Dir
|
||||
cat > $flake1Dir/flake.nix <<EOF
|
||||
{
|
||||
outputs = { self }: { x = builtins.readFile $(pwd)/absolute-paths.sh; };
|
||||
}
|
||||
EOF
|
||||
git -C $flake1Dir add flake.nix
|
||||
git -C $flake1Dir commit -m Initial
|
||||
|
||||
nix eval --impure --json $flake1Dir#x
|
Loading…
Add table
Add a link
Reference in a new issue