-
-
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
nix will pointlessly re-fetch registry entries if they are defined as store paths #7075
Comments
Hmmm. So I've gone bughunting and I think I have found a part answer: I think based on reading Not fully confident about this though: there's also checks that the name of the store path is "source". I wonder if that's related. |
Are you sure that it's actually copying it, or do you just see the Looking at the code, Nix prints the EDIT: nevermind, didn't see your previous message. Indeed the check for the |
I see the copying message, and it also takes a long time. The taking a long time leads me to believe it is being copied. |
A fun thing is that |
Yes. That's a gross approximation, but also required for purity (until/if ever #6530 lands) because relative paths (to the parent) will have a different meaning if you keep it as a subdir. I think you can do |
Update from later: if you name your thing source, Nix will indeed not do the buggy behaviour. Rather odd. |
But how did you rename it with |
What's the rationale behind |
https://git.lix.systems/lix-project/lix/issues/529 funny related bug |
Describe the bug
On my NixOS and nix-darwin machines I pin the system nixpkgs as
nixpkgs
so building stuff is faster, usingnix.registry.nixpkgs.flake = nixpkgs;
in my configuration./etc/nix/registry.json looks like so:
and every time I use nix-command with flakes it pointlessly copies from the nix store to the nix store:
Steps To Reproduce
into /etc/nix/registry.json replacing my
path
above.2.
nix run nixpkgs#hello
Expected behavior
Should execute instantly because it avoids gratuitously copying a store path to the store.
nix-env --version
outputhowever also reproduced on master:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: