Skip to content

Commit

Permalink
Merge pull request #213635 from alyssais/mesa-armv5tel
Browse files Browse the repository at this point in the history
mesa: fix build for armv5tel
  • Loading branch information
K900 authored Jan 30, 2023
2 parents 872d17d + b538df3 commit 7b0719b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions lib/systems/inspect.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,13 @@ rec {
isMusl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf muslabin32 muslabi64 ];
isUClibc = with abis; map (a: { abi = a; }) [ uclibc uclibceabi uclibceabihf ];

isEfi = map (family: { cpu.family = family; })
[ "x86" "arm" "riscv" ];
isEfi = [
{ cpu = { family = "arm"; version = "6"; }; }
{ cpu = { family = "arm"; version = "7"; }; }
{ cpu = { family = "arm"; version = "8"; }; }
{ cpu = { family = "riscv"; }; }
{ cpu = { family = "x86"; }; }
];
};

matchAnyAttrs = patterns:
Expand Down
6 changes: 5 additions & 1 deletion pkgs/development/libraries/mesa/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
"amd" # AMD (aka RADV)
"microsoft-experimental" # WSL virtualized GPU (aka DZN/Dozen)
"swrast" # software renderer (aka Lavapipe)
"virtio-experimental" # QEMU virtualized GPU (aka VirGL)
]
++ lib.optionals (stdenv.hostPlatform.isAarch -> lib.versionAtLeast stdenv.hostPlatform.parsed.cpu.version "6") [
# QEMU virtualized GPU (aka VirGL)
# Requires ATOMIC_INT_LOCK_FREE == 2.
"virtio-experimental"
]
++ lib.optionals stdenv.isAarch64 [
"broadcom" # Broadcom VC5 (Raspberry Pi 4, aka V3D)
Expand Down
1 change: 1 addition & 0 deletions pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
, withHwdb ? true
, withImportd ? !stdenv.hostPlatform.isMusl
, withLibBPF ? lib.versionAtLeast buildPackages.llvmPackages.clang.version "10.0"
&& stdenv.hostPlatform.isAarch -> lib.versionAtLeast stdenv.hostPlatform.parsed.cpu.version "6" # assumes hard floats
&& !stdenv.hostPlatform.isMips64 # see https://github.com/NixOS/nixpkgs/pull/194149#issuecomment-1266642211
, withLocaled ? true
, withLogind ? true
Expand Down

0 comments on commit 7b0719b

Please sign in to comment.