-
Notifications
You must be signed in to change notification settings - Fork 87
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
overrideAttrs
and buildInputs
doesn't include override inputs in environment
#277
Comments
overrideAttrs
and buildInputs
doesn't include overrode inputs in environmentoverrideAttrs
and buildInputs
doesn't include override inputs in environment
I eventually solved this issue by applying overrides to the arguments, collecting the changes, then lowering the final result into |
To be fair, I'm not sure what's happening in here 👀 -- would you mind showing the approach that worked? |
Yeah absolutely. This was my first project I was using with naersk, so the code isn't super pretty. If theres any confusions, feel free to reach out. I only wrote this a couple months ago. The solution I ended up walking away with was the following: The overrides being applied are at this point, and the definitions of those overrides are defined here. https://github.com/Skarlett/coggie-bot/blob/master/iac/coggiebot/default.nix#L33C1-L88 The original pattern I was attempting when I posted this issue was akin to coggiebot = (naersk.buildPackage ./.);
mockingbird = coggiebot.overrideAttrs { buildInputs = [ ... ]; };
other-features = mockingbird.overrrideAttrs { ... }; Attempting the above resulted in the original error posted. This may be difficult to reproduce, as I was just learning nix at the time, and there may have been mistakes previously which lead to this incident. there is a sliver of documentation on this portion of the project, which can be found here https://github.com/Skarlett/coggie-bot/blob/master/docs/hacking.md#finalizing-in-nix ps: if you need to build my project |
Ah, I think I know what's going on - when you call So when you do stuff like:
... it overrides attributes only for that second derivation (i.e. your code), but it doesn't override stuff for the expression that builds the dependencies (since that expression is constructed separately inside In general, this is what the
... will apply this function to both derivations included in the build. Although in this particular case, I think something like this should just do it:
|
Building mockingbird fails with
Though, we can see it included
The text was updated successfully, but these errors were encountered: