[Nix#7075] nix will pointlessly re-fetch flake inputs if they are defined as store paths not named "source" #630
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#630
Loading…
Add table
Add a link
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?
Upstream-Issue: NixOS/nix#7075
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 bug here is that if a flake path is named "source" it is special cased. This is related to #529 which is a funny way to cause a crash.
I don't know the original justification for this special casing but it is probably not possible to remove without breaking back compat.
[Nix#7075] nix will pointlessly re-fetch registry entries if they are defined as store pathsto [Nix#7075] nix will pointlessly re-fetch flake inputs if they are defined as store paths not named "source"