-
Notifications
You must be signed in to change notification settings - Fork 86
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
mkDummySrc: fix handling when src is already filtered #47
Conversation
|
||
cargoTomlsBase = uncleanSrcBasePath; | ||
inherit (uncleanFiles) cargoTomls; | ||
|
||
cleanSrc = | ||
let | ||
adjustPaths = builtins.map (p: removePrefix uncleanSrcBasePath (toString p)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I correct in saying that this was added in 4f2b1c4 but wasn't actually used (I'm assuming it was just leftover from an iteration of that commit)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep I think I was iterating on whether to make the filter on the next line as its own variable, but it looks like it was never used (since Nix is lazy it just ignores unused input 🤷 )
then src.origSrc | ||
else src; | ||
|
||
uncleanSrcBasePath = (toString origSrc) + "/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is done to forcefully evaluate the source derivation? Wouldn't this already be evaluated in the call to findCargoFiles
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a good enough intuitive understanding of how Nix treats paths and strings (and coercing between the two) to explain why this is needed... I did try taking it out and a bunch of tests failed so it's load bearing at some capacity 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works, thanks!
Fixes #46