meson: fix cpu_family for aarch64
As documented, it should be `aarch64` for AArch64. * https://mesonbuild.com/Reference-tables.html#cpu-families ``` $ nix eval '((import <nixpkgs> {}).pkgsCross.aarch64-multiplatform.stdenv.targetPlatform.parsed.cpu.family)' "arm" ``` The lookup table will ensure that, at any point, meson does not pick the wrong family.
This commit is contained in:
parent
8abe5ee07e
commit
858076ef56
@ -1,5 +1,15 @@
|
||||
{ lib, python3Packages, stdenv, writeTextDir, substituteAll, targetPackages }:
|
||||
|
||||
let
|
||||
# See https://mesonbuild.com/Reference-tables.html#cpu-families
|
||||
cpuFamilies = {
|
||||
"aarch64" = "aarch64";
|
||||
"armv6l" = "arm";
|
||||
"armv7l" = "arm";
|
||||
"i686" = "x86";
|
||||
"x86_64" = "x86_64";
|
||||
};
|
||||
in
|
||||
python3Packages.buildPythonApplication rec {
|
||||
version = "0.49.2";
|
||||
pname = "meson";
|
||||
@ -68,7 +78,7 @@ python3Packages.buildPythonApplication rec {
|
||||
|
||||
[host_machine]
|
||||
system = '${targetPackages.stdenv.targetPlatform.parsed.kernel.name}'
|
||||
cpu_family = '${targetPackages.stdenv.targetPlatform.parsed.cpu.family}'
|
||||
cpu_family = '${cpuFamilies.${targetPackages.stdenv.targetPlatform.parsed.cpu.name}}'
|
||||
cpu = '${targetPackages.stdenv.targetPlatform.parsed.cpu.name}'
|
||||
endian = ${if targetPackages.stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"}
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user