-
Notifications
You must be signed in to change notification settings - Fork 95
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
Dummy source derivation relying on source when using flake's self argument as source #28
Comments
Hi @winterqt thanks for the reproduction flake! I was able to reproduce the issue and here are some of my observations: Normally I stick my actual rust/cargo files in their own directory and then do The source dummification tries to only copy the exact files needed (example) in an attempt to make sure that the dummy-src derivation only depends on things like I don't know if there is some different kinds of interactions (i.e. source cleaning) that Nix does under the hood when a derivation's input is a sub-directory of the flake vs taking the entire flake source itself. Either way, this is undesired behavior and it would be good to find a way to avoid it (maybe an explicit |
Did a quick proof of concept of cleaning the source directory (to exclude anything we don't need for making the dummy source) and it appears to fix the cache invalidation bug. Will post a PR sometime later! |
@winterqt I believe this is fixed now, please feel free to open an issue if you run into anything else! |
When using
self
over./.
for the source tobuildPackage
, the dummy source derivation relies on the source of the flake.Good:
Bad:
A reproduction is available at https://github.com/winterqt/crane-dummy-src-invalidation. This may be outside of Crane's control (as in, this may be an issue with how this attribute of flakes are implemented).
The text was updated successfully, but these errors were encountered: