Paths are relative to the directory rather than the symlink target when passing a file to be eval'd explicitly and default.nix
in the given directory is a symlink #554
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#554
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
When you have a
default.nix
symlink to an actualdefault.nix
, paths referenced in thatdefault.nix
are relative to the symlink itself rather than thedefault.nix
it points to if you explicitly pass the directory to Lix.Expected behavior
nix-instantiate
andnix-instantiate .
should behave the same.Ideally, both should resolve the symlink and make path references inside of it relative to the target file's dirname.
nix --version
outputnix (Lix, like Nix) 2.91.0
Additional context
In the new CLI this is critical because, in contras to the old CLI,
-f dir
is the only possible way to reference a directory withdefault.nix
.Paths are relative to the directory rather than the symlink target when passing a file to be eval'd explicitly and default.nix in the given directory is a symlinkto Paths are relative to the directory rather than the symlink target when passing a file to be eval'd explicitly and `default.nix` in the given directory is a symlinkTo clarify, is this also the case if you explicitly give it the path to the default.nix symlink or just the directory?
Only if you point it at a directory. If you point it at a symlink file, it's resolved correctly.