-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Platform config improvements #105294
Platform config improvements #105294
Conversation
|
||
select = platform: | ||
# x86 | ||
/**/ if platform.isx86_32 then pc32 |
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.
these should verify we are still looking at linux systems
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.
Actually the original didn’t check that for pcBase so maybe it shouldn’t matter. I guess defaulting yo pcBase if non linux is reasonable.
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.
Yeah I would rather decide what to do with that later. If some non-linux platform has some linux config stuff, it should be harmless.
We dont have to match on exact strings if we get accessed to `parsed`. Co-authored-by: Matthew Bauer <[email protected]>
40b8872
to
9918ba2
Compare
@matthewbauer OK got all your suggestions. |
Sorry - forgot to approve - but looks good! |
@@ -187,6 +187,7 @@ stdenv.mkDerivation { | |||
else if targetPlatform.isAlpha then "alpha" | |||
else if targetPlatform.isVc4 then "vc4" | |||
else if targetPlatform.isOr1k then "or1k" | |||
else if targetPlatform.isRiscV then "lriscv" |
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.
Did you test this? I tried to build NixOS on RISC-V a few months ago and I added "riscv" which seemed to work.
I'm now rebasing my branch on top of master and I have a conflict here.
name = "riscv-multiplatform"; | ||
kernelArch = "riscv"; | ||
bfdEmulation = "elf${bits}lriscv"; |
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.
@JohnAZoidberg it's based off of this which has the "l", presumably for little endian.
Motivation for this change
The first commit is about making the selection of a "platform" less haphazard. The rest are about trying to clean up exactly what's there so it's a bit less ad-hoc. (I hope to do more on that front later.)
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)