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
top-level: apply platform config to cross system #38818
Conversation
So I never thought let
runSystem = lib.systems.elaborate
(builtins.intersectAttrs { platform = null; } config // args.runSystem); as is done today (with @shlevy @dtzWill @matthewbauer @bgamari @dezgeg @edolstra what do you all think? |
That seems massively verbose and non-obvious to figure out. I guess the real problem is that this new BTW don't this |
@lopsided98 I'm curious, what's your use case for changing |
@dezgeg Yes, I am changing defconfig, as well as enabling extra kernel options. |
The PR or my proposal.
The
Separately,
Agreed. @dezgeg I pinged you in IRC but we should really sync up in real time to go over all this stuff and document it. I am a single point of failure today because I rewrote all that stuff a year ago, and I do not want to be that. |
EDIT: eep I accidentally commented on wrong issue, sorry about that! Nothing to see here.... |
@lopsided98 I recently added 87a68c4. Is that enough for your custom kernel uses to avoid the need for setting |
Yes, I have moved all my custom configuration to the kernel derivations. I still feel like the current behavior is not optimal, but I'll close this PR. |
Motivation for this change
It is impossible to use the option
nixpkgs.config.platform
to set the platform when cross compiling, because it is not passed tocrossSystem
.Things done
This PR elaborates
crossSystem
usingconfig.platform
whencrossSystem
is not null, and retains the current behavior when it is null. Someone who knows more about the internals of nixpkgs may have a more elegant way of doing this, but this solution solves the problem for me.build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)