-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source roots result in /nix/store/<hash>-<hash>-source #10627
Comments
we could already improve on the user experience here by warning the user to avoid such paths. |
This is a pre-flakes behavior that would be a breaking change.
I believe this would trigger quite often, and without being all that actionable for most users. We'd better address the root cause, which is putting flakes in the store in the first place, making this problem prevalent instead of niche. We could do so with either
|
If the source path for fetchToStore is a direct store path, (i.e. /nix/store/hash-name. things like /nix/store/hash-name/file.sh does not count), return it directly instead of copying it. Related: NixOS#10627
If the source path for fetchToStore is a direct store path, (i.e. /nix/store/hash-name. things like /nix/store/hash-name/file.sh does not count), return it directly instead of copying it. Related: NixOS#10627
If the source path for fetchToStore is a direct store path, (i.e. /nix/store/hash-name. things like /nix/store/hash-name/file.sh does not count), return it directly instead of copying it. Related: NixOS#10627
Describe the bug
In a flake with a derivation attribute like
the tree gets copied into the store as
/nix/store/<hash1>-<hash2>-source
. This is because (pre lazy-trees) the basename of the tree is/nix/store/<hash2>-source
.This double-copying is obviously undesirable, but we can't fix it without a breaking change (i.e. without changing derivation paths).
On lazy-trees, we can at least avoid writing
/nix/store/<hash2>-source
to disk, but we do need to hash the input to compute<hash2>
. (See c5ae41d.)Steps To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
nix-env --version
outputAdditional context
Add any other context about the problem here.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: