1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Fix support for relative non-flake inputs (path:./bla)

This commit is contained in:
Eelco Dolstra 2023-01-12 16:16:30 +01:00
parent 20a0a74f49
commit fa5af1e583
2 changed files with 34 additions and 13 deletions

View file

@ -124,15 +124,21 @@ cat > $flakeFollowsA/flake.nix <<EOF
description = "Flake A";
inputs = {
B.url = "path:../flakeB";
E.flake = false;
E.url = "path:./foo.nix";
};
outputs = { ... }: {};
outputs = { E, ... }: { e = import E; };
}
EOF
git -C $flakeFollowsA add flake.nix
echo 123 > $flakeFollowsA/foo.nix
git -C $flakeFollowsA add flake.nix foo.nix
nix flake lock $flakeFollowsA
[[ $(nix eval --json $flakeFollowsA#e) = 123 ]]
# Non-existant follows should print a warning.
cat >$flakeFollowsA/flake.nix <<EOF
{