Repository navigation
Conversation
|
I think this would violate the postcondition that the resulting store path is named |
|
hmm, i see your point. but nix store paths aren't content addressable to begin with (unless (and besides, i can still bypass all this by naming my derivation "source") |
|
They are content addressed to begin with without that feature, just not ones produced by derivations. |
|
@Ericson2314 is there a real way to tell them apart? is it possible to tell apart store paths that are actually content-addressable, vs store paths that just happen to be named "source"? |
|
I have observed assertion failure from nix if I name my derivation "source" (without this patch). I think this is poorly thought out. |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-08-07-nix-team-meeting-minutes-167/50287/1 |
|
Based on today's meeting, returning a path named |
|
would naming a derivation "source" become prohibited in the future? |
|
@yshui No, I don't think we would need to prohibit that. |
|
The reason to hold off is that we may need to revert this change in behavior soon, so that we don't have to track the custom name in the lazy path value returned by
I agree and in fact it is desirable when performing file set filtering in a content-addressed derivation. If that derivation is also named |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/confused-about-nix-copying-nixpkgs/53737/4 |
|
We've released a fix for fetches We also see opportunities to remove copying for inputs that originate from store paths, as we are growing the ability to internally "mount" lazily loaded file system contents.
Changing the semantics of fetching as proposed in this PR does not seem like a viable solution though, so I'll close this one now. |
Motivation
Avoid unnecessary store -> store copies
Context
See #11228
I checked the PR introduced this change, and didn't find an explanation why this
== "source"check is necessary.IMO all store -> store copies are unnecessary. And even if there is indeed a valid reason this is only done for store paths named "source", it's not like the user can't just name their derivation "source".
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.