-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
featureFeature request or proposalFeature request or proposallanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etc
Description
Have a look at the following directory structure:
.
├── 1
│ ├── content.nix content: "In 1"
│ └── default.nix -> ../2/default.nix
└── 2
├── content.nix content: "In 2"
└── default.nix content: import ./content.nix
Now this is what happens with evaluation:
$ nix-instantiate --eval 1
"In 1"
$ nix-instantiate --eval 2
"In 2"
However what I expect to happen is
$ nix-instantiate --eval 1
"In 2"
$ nix-instantiate --eval 2
"In 2"
because the symlink should have influenced all imports as well.
This can lead to unexpected behaviour. A good example of this is if I were to have a directory like this (with /path/to/nixpkgs being a nixpkgs checkout):
.
└── nixos -> /path/to/nixpkgs/nixos
Then trying to use this folder will fail:
$ nix-instantiate nixos/release-combined.nix -A tested
error: opening file '/home/infinisil/Test/nixsym/default.nix': No such file or directory
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureFeature request or proposalFeature request or proposallanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etc