Merge pull request #183997 from alyssais/isAarch

authored by Sandro and committed by GitHub 6e5cce71 6a894dc6

+35 -37
+1 -1
nixos/lib/qemu-common.nix
··· 18 18 ]; 19 19 20 20 qemuSerialDevice = if pkgs.stdenv.hostPlatform.isx86 || pkgs.stdenv.hostPlatform.isRiscV then "ttyS0" 21 - else if (with pkgs.stdenv.hostPlatform; isAarch32 || isAarch64 || isPower) then "ttyAMA0" 21 + else if (with pkgs.stdenv.hostPlatform; isAarch || isPower) then "ttyAMA0" 22 22 else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; 23 23 24 24 qemuBinary = qemuPkg: {
+1 -1
nixos/modules/hardware/all-firmware.nix
··· 62 62 alsa-firmware 63 63 sof-firmware 64 64 libreelec-dvb-firmware 65 - ] ++ optional (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) raspberrypiWirelessFirmware 65 + ] ++ optional pkgs.stdenv.hostPlatform.isAarch raspberrypiWirelessFirmware 66 66 ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ 67 67 rtl8723bs-firmware 68 68 ] ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "5.16") [
+2 -2
nixos/modules/installer/cd-dvd/iso-image.nix
··· 476 476 477 477 isoImage.squashfsCompression = mkOption { 478 478 default = with pkgs.stdenv.targetPlatform; "xz -Xdict-size 100% " 479 - + lib.optionalString (isx86_32 || isx86_64) "-Xbcj x86" 479 + + lib.optionalString isx86 "-Xbcj x86" 480 480 # Untested but should also reduce size for these platforms 481 - + lib.optionalString (isAarch32 || isAarch64) "-Xbcj arm" 481 + + lib.optionalString isAarch "-Xbcj arm" 482 482 + lib.optionalString (isPower && is32bit && isBigEndian) "-Xbcj powerpc" 483 483 + lib.optionalString (isSparc) "-Xbcj sparc"; 484 484 description = ''
+1 -1
nixos/modules/profiles/all-hardware.nix
··· 57 57 58 58 # Hyper-V support. 59 59 "hv_storvsc" 60 - ] ++ lib.optionals (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) [ 60 + ] ++ lib.optionals pkgs.stdenv.hostPlatform.isAarch [ 61 61 # Most of the following falls into two categories: 62 62 # - early KMS / early display 63 63 # - early storage (e.g. USB) support
+1 -1
nixos/modules/services/home-automation/home-assistant.nix
··· 92 92 "default_config" 93 93 "met" 94 94 "esphome" 95 - ] ++ optionals (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) [ 95 + ] ++ optionals pkgs.stdenv.hostPlatform.isAarch [ 96 96 # Use the platform as an indicator that we might be running on a RaspberryPi and include 97 97 # relevant components 98 98 "rpi_power"
+1 -1
nixos/modules/virtualisation/qemu-vm.nix
··· 870 870 (mkIf pkgs.stdenv.hostPlatform.isx86 [ 871 871 "-usb" "-device usb-tablet,bus=usb-bus.0" 872 872 ]) 873 - (mkIf (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) [ 873 + (mkIf pkgs.stdenv.hostPlatform.isAarch [ 874 874 "-device virtio-gpu-pci" "-device usb-ehci,id=usb0" "-device usb-kbd" "-device usb-tablet" 875 875 ]) 876 876 (let
+1 -1
pkgs/applications/networking/instant-messengers/jami/daemon.nix
··· 48 48 configureFlags = old.configureFlags 49 49 ++ (readLinesToList ./config/ffmpeg_args_common) 50 50 ++ lib.optionals stdenv.isLinux (readLinesToList ./config/ffmpeg_args_linux) 51 - ++ lib.optionals (stdenv.isx86_32 || stdenv.isx86_64) (readLinesToList ./config/ffmpeg_args_x86); 51 + ++ lib.optionals stdenv.hostPlatform.isx86 (readLinesToList ./config/ffmpeg_args_x86); 52 52 outputs = [ "out" "doc" ]; 53 53 meta = old.meta // { 54 54 # undefined reference to `ff_nlmeans_init_aarch64'
+1 -1
pkgs/applications/video/handbrake/default.nix
··· 206 206 ++ optional (!useGtk) "--disable-gtk" 207 207 ++ optional useFdk "--enable-fdk-aac" 208 208 ++ optional stdenv.isDarwin "--disable-xcode" 209 - ++ optional (stdenv.isx86_32 || stdenv.isx86_64) "--harden"; 209 + ++ optional stdenv.hostPlatform.isx86 "--harden"; 210 210 211 211 # NOTE: 2018-12-27: Check NixOS HandBrake test if changing 212 212 NIX_LDFLAGS = [ "-lx265" ];
+2 -3
pkgs/applications/video/vlc/default.nix
··· 80 80 81 81 let 82 82 inherit (lib) optionalString optional optionals; 83 - hostIsAarch = stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64; 84 83 in 85 84 stdenv.mkDerivation rec { 86 85 pname = "${optionalString onlyLibVLC "lib"}vlc"; ··· 159 158 xcbutilkeysyms 160 159 xlibsWrapper 161 160 ]) 162 - ++ optional (!hostIsAarch && !onlyLibVLC) live555 161 + ++ optional (!stdenv.hostPlatform.isAarch && !onlyLibVLC) live555 163 162 ++ optional jackSupport libjack2 164 163 ++ optionals chromecastSupport [ libmicrodns protobuf ] 165 164 ++ optionals skins2Support (with xorg; [ ··· 184 183 185 184 enableParallelBuilding = true; 186 185 187 - LIVE555_PREFIX = if hostIsAarch then null else live555; 186 + LIVE555_PREFIX = if stdenv.hostPlatform.isAarch then null else live555; 188 187 189 188 # vlc depends on a c11-gcc wrapper script which we don't have so we need to 190 189 # set the path to the compiler
+3 -3
pkgs/development/haskell-modules/configuration-arm.nix
··· 1 1 # ARM-SPECIFIC OVERRIDES FOR THE HASKELL PACKAGE SET IN NIXPKGS 2 2 # 3 - # This extension is applied to all haskell package sets in nixpkgs 4 - # if `stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64` 5 - # to apply arm specific workarounds or fixes. 3 + # This extension is applied to all haskell package sets in nixpkgs if 4 + # `stdenv.hostPlatform.isAarch` to apply arm specific workarounds or 5 + # fixes. 6 6 # 7 7 # The file is split into three parts: 8 8 #
+1 -2
pkgs/development/haskell-modules/default.nix
··· 21 21 inherit stdenv haskellLib ghc buildHaskellPackages extensible-self all-cabal-hashes; 22 22 }; 23 23 24 - isArm = with stdenv.hostPlatform; isAarch64 || isAarch32; 25 - platformConfigurations = lib.optionals isArm [ 24 + platformConfigurations = lib.optionals stdenv.hostPlatform.isAarch [ 26 25 (configurationArm { inherit pkgs haskellLib; }) 27 26 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ 28 27 (configurationDarwin { inherit pkgs haskellLib; })
+1 -1
pkgs/development/interpreters/j/default.nix
··· 30 30 # emulating build_all.sh configuration variables 31 31 jplatform = 32 32 if stdenv.isDarwin then "darwin" 33 - else if (stdenv.isAarch32 || stdenv.isAarch64) then "raspberry" 33 + else if stdenv.hostPlatform.isAarch then "raspberry" 34 34 else if stdenv.isLinux then "linux" 35 35 else "unsupported"; 36 36
+1 -1
pkgs/development/libraries/exiv2/default.nix
··· 69 69 patchShebangs ../test/ 70 70 mkdir ../test/tmp 71 71 72 - ${lib.optionalString (stdenv.isAarch64 || stdenv.isAarch32) '' 72 + ${lib.optionalString stdenv.hostPlatform.isAarch '' 73 73 # Fix tests on arm 74 74 # https://github.com/Exiv2/exiv2/issues/933 75 75 rm -f ../tests/bugfixes/github/test_CVE_2018_12265.py
+2 -2
pkgs/development/libraries/gperftools/default.nix
··· 29 29 nativeBuildInputs = [ autoreconfHook ]; 30 30 31 31 # tcmalloc uses libunwind in a way that works correctly only on non-ARM linux 32 - buildInputs = lib.optional (stdenv.isLinux && !(stdenv.isAarch64 || stdenv.isAarch32)) libunwind; 32 + buildInputs = lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isAarch) libunwind; 33 33 34 34 # Disable general dynamic TLS on AArch to support dlopen()'ing the library: 35 35 # https://bugzilla.redhat.com/show_bug.cgi?id=1483558 36 - configureFlags = lib.optional (stdenv.isAarch32 || stdenv.isAarch64) 36 + configureFlags = lib.optional stdenv.hostPlatform.isAarch 37 37 "--disable-general-dynamic-tls"; 38 38 39 39 prePatch = lib.optionalString stdenv.isDarwin ''
+1 -1
pkgs/development/libraries/libdrm/default.nix
··· 24 24 "-Dnm-path=${stdenv.cc.targetPrefix}nm" 25 25 "-Dinstall-test-programs=true" 26 26 "-Domap=true" 27 - ] ++ lib.optionals (stdenv.isAarch32 || stdenv.isAarch64) [ 27 + ] ++ lib.optionals stdenv.hostPlatform.isAarch [ 28 28 "-Dtegra=true" 29 29 "-Detnaviv=true" 30 30 ];
+1 -1
pkgs/development/libraries/x264/default.nix
··· 29 29 preConfigure = lib.optionalString (stdenv.buildPlatform.isx86_64 || stdenv.hostPlatform.isi686) '' 30 30 # `AS' is set to the binutils assembler, but we need nasm 31 31 unset AS 32 - '' + lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) '' 32 + '' + lib.optionalString stdenv.hostPlatform.isAarch '' 33 33 export AS=$CC 34 34 ''; 35 35
+1 -1
pkgs/development/python-modules/afdko/default.nix
··· 85 85 "test_filename_without_dir" 86 86 "test_overwrite" 87 87 "test_options" 88 - ] ++ lib.optionals (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isRiscV) [ 88 + ] ++ lib.optionals (stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isRiscV) [ 89 89 # unknown reason so far 90 90 # https://github.com/adobe-type-tools/afdko/issues/1425 91 91 "test_spec"
+1 -1
pkgs/development/python-modules/fastnumbers/default.nix
··· 29 29 30 30 # Tests fail due to numeric precision differences on ARM 31 31 # See https://github.com/SethMMorton/fastnumbers/issues/28 32 - doCheck = !(stdenv.isAarch64 || stdenv.isAarch32); 32 + doCheck = !stdenv.hostPlatform.isAarch; 33 33 34 34 checkInputs = [ 35 35 hypothesis
+1 -1
pkgs/development/python-modules/uvloop/default.nix
··· 48 48 # Depend on pyopenssl 49 49 "--deselect tests/test_tcp.py::Test_UV_TCPSSL::test_flush_before_shutdown" 50 50 "--deselect tests/test_tcp.py::Test_UV_TCPSSL::test_renegotiation" 51 - ] ++ lib.optionals (stdenv.isAarch32 || stdenv.isAarch64) [ 51 + ] ++ lib.optionals stdenv.hostPlatform.isAarch [ 52 52 # test gets stuck in epoll_pwait on hydras aarch64 builders 53 53 # https://github.com/MagicStack/uvloop/issues/412 54 54 "--deselect tests/test_tcp.py::Test_AIO_TCPSSL::test_remote_shutdown_receives_trailing_data"
+1 -1
pkgs/games/gemrb/default.nix
··· 18 18 let 19 19 # the GLES backend on rpi is untested as I don't have the hardware 20 20 backend = 21 - if (stdenv.isx86_32 || stdenv.isx86_64) then "OpenGL" else "GLES"; 21 + if stdenv.hostPlatform.isx86 then "OpenGL" else "GLES"; 22 22 23 23 withVLC = stdenv.isDarwin; 24 24
+1 -1
pkgs/misc/screensavers/xscreensaver/default.nix
··· 39 39 ]; 40 40 41 41 # "marbling" has NEON code that mixes signed and unsigned vector types 42 - NIX_CFLAGS_COMPILE = lib.optional (with stdenv.hostPlatform; isAarch64 || isAarch32) "-flax-vector-conversions"; 42 + NIX_CFLAGS_COMPILE = lib.optional stdenv.hostPlatform.isAarch "-flax-vector-conversions"; 43 43 44 44 postInstall = '' 45 45 for bin in $out/bin/*; do
+2 -2
pkgs/os-specific/linux/nmon/default.nix
··· 13 13 dontUnpack = true; 14 14 buildPhase = "${stdenv.cc.targetPrefix}cc -o nmon ${src} -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -lm -g -D ${ 15 15 with stdenv.targetPlatform; 16 - if isx86_32 || isx86_64 then "X86" 17 - else if isAarch32 || isAarch64 then "ARM" 16 + if isx86 then "X86" 17 + else if isAarch then "ARM" 18 18 else if isPower then "POWER" 19 19 else "UNKNOWN" 20 20 }";
+1 -1
pkgs/os-specific/linux/rtl8189es/default.nix
··· 25 25 makeFlags = kernel.makeFlags ++ [ 26 26 "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 27 27 ("CONFIG_PLATFORM_I386_PC=" + (if (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) then "y" else "n")) 28 - ("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")) 28 + ("CONFIG_PLATFORM_ARM_RPI=" + (if stdenv.hostPlatform.isAarch then "y" else "n")) 29 29 ]; 30 30 31 31 preInstall = ''
+1 -1
pkgs/os-specific/linux/rtl8812au/default.nix
··· 29 29 "ARCH=${stdenv.hostPlatform.linuxArch}" 30 30 "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 31 31 ("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n")) 32 - ("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")) 32 + ("CONFIG_PLATFORM_ARM_RPI=" + (if stdenv.hostPlatform.isAarch then "y" else "n")) 33 33 ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ 34 34 "CROSS_COMPILE=${stdenv.cc.targetPrefix}" 35 35 ];
+1 -1
pkgs/shells/bash/bash-completion/default.nix
··· 46 46 # - ignore test_screen because it assumes vt terminals exist 47 47 checkPhase = '' 48 48 pytest . \ 49 - ${lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--ignore=test/t/test_gcc.py"} \ 49 + ${lib.optionalString stdenv.hostPlatform.isAarch "--ignore=test/t/test_gcc.py"} \ 50 50 --ignore=test/t/test_chsh.py \ 51 51 --ignore=test/t/test_ether_wake.py \ 52 52 --ignore=test/t/test_ifdown.py \
+1 -1
pkgs/stdenv/generic/make-derivation.nix
··· 178 178 # Except when: 179 179 # - static aarch64, where compilation works, but produces segfaulting dynamically linked binaries. 180 180 # - static armv7l, where compilation fails. 181 - !((stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) && stdenv.hostPlatform.isStatic) 181 + !(stdenv.hostPlatform.isAarch && stdenv.hostPlatform.isStatic) 182 182 then supportedHardeningFlags 183 183 else lib.remove "pie" supportedHardeningFlags; 184 184 enabledHardeningOptions =
+3 -3
pkgs/top-level/haskell-packages.nix
··· 108 108 # aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar 109 109 # the oldest ghc with aarch64-darwin support is 8.10.5 110 110 # Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them 111 - if stdenv.isAarch64 || stdenv.isAarch32 then 111 + if stdenv.hostPlatform.isAarch then 112 112 packages.ghc8107BinaryMinimal 113 113 else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then 114 114 # to my (@a-m-joseph) knowledge there are no newer official binaries for this platform ··· 127 127 bootPkgs = 128 128 # aarch64 ghc8107Binary exceeds max output size on hydra 129 129 # the oldest ghc with aarch64-darwin support is 8.10.5 130 - if stdenv.isAarch64 || stdenv.isAarch32 then 130 + if stdenv.hostPlatform.isAarch then 131 131 packages.ghc8107BinaryMinimal 132 132 else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then 133 133 packages.ghc8107 ··· 141 141 ghc923 = callPackage ../development/compilers/ghc/9.2.3.nix { 142 142 bootPkgs = 143 143 # aarch64 ghc8107Binary exceeds max output size on hydra 144 - if stdenv.isAarch64 || stdenv.isAarch32 then 144 + if stdenv.hostPlatform.isAarch then 145 145 packages.ghc8107BinaryMinimal 146 146 else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then 147 147 packages.ghc8107