Skip to content
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

lib/systems: fix uname.processor for powerpc and mips64 #189967

Merged
merged 1 commit into from Jan 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions lib/systems/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@ rec {
}.${final.parsed.kernel.name} or null;

# uname -m
processor = final.parsed.cpu.name;
processor =
if final.isPower64
then "ppc64${lib.optionalString final.isLittleEndian "le"}"
This conversation was marked as resolved.
Show resolved Hide resolved
else if final.isPower
then "ppc${lib.optionalString final.isLittleEndian "le"}"
else if final.isMips64
then "mips64" # endianness is *not* included on mips64
else final.parsed.cpu.name;

# uname -r
release = null;
Expand Down Expand Up @@ -135,12 +142,7 @@ rec {
if final.isAarch32 then "arm"
else if final.isx86_64 then "x86_64"
else if final.isx86 then "i386"
else {
powerpc = "ppc";
powerpcle = "ppc";
powerpc64 = "ppc64";
powerpc64le = "ppc64le";
}.${final.parsed.cpu.name} or final.parsed.cpu.name;
else final.uname.processor;

# Name used by UEFI for architectures.
efiArch =
Expand Down