Merge pull request #146829 from r-burns/isx86

Sandro 07f29d2d 60b8a7ea

Changed files
+42 -42
nixos
pkgs
applications
graphics
krita
science
logic
monosat
video
mplayer
build-support
desktops
gnome
core
gnome-software
development
compilers
interpreters
libraries
SDL2_gfx
glibc
libimagequant
opencolorio
pcl
x264
python-modules
pyqtgraph
os-specific
linux
fbterm
firmware
fwupd
read-edid
rtl8812au
tools
graphics
pngquant
misc
networking
fastd
security
mkp224o
top-level
+1 -1
nixos/lib/make-zfs-image.nix
···
pkgs.vmTools.override {
rootModules =
[ "zfs" "9p" "9pnet_virtio" "virtio_pci" "virtio_blk" ] ++
-
(pkgs.lib.optional (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) "rtc_cmos");
+
(pkgs.lib.optional pkgs.stdenv.hostPlatform.isx86 "rtc_cmos");
kernel = modulesTree;
}
).runInLinuxVM (
+1 -1
nixos/lib/qemu-common.nix
···
''-netdev vde,id=vlan${toString nic},sock="$QEMU_VDE_SOCKET_${toString net}"''
];
-
qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0"
+
qemuSerialDevice = if pkgs.stdenv.hostPlatform.isx86 then "ttyS0"
else if (with pkgs.stdenv.hostPlatform; isAarch32 || isAarch64 || isPower) then "ttyAMA0"
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
+1 -1
nixos/modules/hardware/all-firmware.nix
···
b43Firmware_5_1_138
b43Firmware_6_30_163_46
b43FirmwareCutter
-
] ++ optional (pkgs.stdenv.hostPlatform.isi686 || pkgs.stdenv.hostPlatform.isx86_64) facetimehd-firmware;
+
] ++ optional pkgs.stdenv.hostPlatform.isx86 facetimehd-firmware;
})
(mkIf cfg.wirelessRegulatoryDatabase {
hardware.firmware = [ pkgs.wireless-regdb ];
+1 -1
nixos/modules/installer/cd-dvd/iso-image.nix
···
throw "Unsupported architecture";
# Syslinux (and isolinux) only supports x86-based architectures.
-
canx86BiosBoot = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
+
canx86BiosBoot = pkgs.stdenv.hostPlatform.isx86;
in
+1 -1
nixos/modules/system/boot/kernel.nix
···
"hid_generic" "hid_lenovo" "hid_apple" "hid_roccat"
"hid_logitech_hidpp" "hid_logitech_dj" "hid_microsoft"
-
] ++ optionals (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [
+
] ++ optionals pkgs.stdenv.hostPlatform.isx86 [
# Misc. x86 keyboard stuff.
"pcips2" "atkbd" "i8042"
+1 -1
nixos/modules/virtualisation/azure-agent.nix
···
config = mkIf cfg.enable {
assertions = [ {
-
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
+
assertion = pkgs.stdenv.hostPlatform.isx86;
message = "Azure not currently supported on ${pkgs.stdenv.hostPlatform.system}";
} {
assertion = config.networking.networkmanager.enable == false;
+2 -2
nixos/modules/virtualisation/qemu-vm.nix
···
imap1 (idx: drive: drive // { device = driveDeviceName idx; });
efiPrefix =
-
if (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then "${pkgs.OVMF.fd}/FV/OVMF"
+
if pkgs.stdenv.hostPlatform.isx86 then "${pkgs.OVMF.fd}/FV/OVMF"
else if pkgs.stdenv.isAarch64 then "${pkgs.OVMF.fd}/FV/AAVMF"
else throw "No EFI firmware available for platform";
efiFirmware = "${efiPrefix}_CODE.fd";
···
# FIXME: Consolidate this one day.
virtualisation.qemu.options = mkMerge [
-
(mkIf (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [
+
(mkIf pkgs.stdenv.hostPlatform.isx86 [
"-usb" "-device usb-tablet,bus=usb-bus.0"
])
(mkIf (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) [
+1 -1
nixos/modules/virtualisation/virtualbox-guest.nix
···
config = mkIf cfg.enable (mkMerge [{
assertions = [{
-
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
+
assertion = pkgs.stdenv.hostPlatform.isx86;
message = "Virtualbox not currently supported on ${pkgs.stdenv.hostPlatform.system}";
}];
+1 -1
nixos/modules/virtualisation/vmware-guest.nix
···
config = mkIf cfg.enable {
assertions = [ {
-
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
+
assertion = pkgs.stdenv.hostPlatform.isx86;
message = "VMWare guest is not currently supported on ${pkgs.stdenv.hostPlatform.system}";
} ];
+1 -1
nixos/tests/installer.nix
···
let iface = if grubVersion == 1 then "ide" else "virtio";
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
bios = if pkgs.stdenv.isAarch64 then "QEMU_EFI.fd" else "OVMF.fd";
-
in if !isEfi && !(pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then
+
in if !isEfi && !pkgs.stdenv.hostPlatform.isx86 then
throw "Non-EFI boot methods are only supported on i686 / x86_64"
else ''
def assemble_qemu_flags():
+1 -1
pkgs/applications/graphics/krita/generic.nix
···
openjpeg opencolorio_1 poppler curl ilmbase
qtmultimedia qtx11extras quazip
python3Packages.pyqt5
-
] ++ lib.optional (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) vc;
+
] ++ lib.optional stdenv.hostPlatform.isx86 vc;
NIX_CFLAGS_COMPILE = [ "-I${ilmbase.dev}/include/OpenEXR" ]
++ lib.optional stdenv.cc.isGNU "-Wno-deprecated-copy";
+1 -1
pkgs/applications/science/logic/monosat/default.nix
···
# source behind __linux__ check assumes system is also x86 and
# tries to disable x86/x87-specific extended precision mode
# https://github.com/sambayless/monosat/issues/33
-
commonPostPatch = lib.optionalString (!(stdenv.isi686 || stdenv.isx86_64)) ''
+
commonPostPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
substituteInPlace src/monosat/Main.cc \
--replace 'defined(__linux__)' '0'
'';
+1 -1
pkgs/applications/video/mplayer/default.nix
···
(useUnfreeCodecs && codecs != null && !crossBuild)
"--codecsdir=${codecs}"
++ optional
-
((stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) && !crossBuild)
+
(stdenv.hostPlatform.isx86 && !crossBuild)
"--enable-runtime-cpudetection"
++ optional fribidiSupport "--enable-fribidi"
++ optional stdenv.isLinux "--enable-vidix"
+1 -1
pkgs/build-support/vm/default.nix
···
, storeDir ? builtins.storeDir
, rootModules ?
[ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "crc32c_generic" ]
-
++ pkgs.lib.optional (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) "rtc_cmos"
+
++ pkgs.lib.optional pkgs.stdenv.hostPlatform.isx86 "rtc_cmos"
}:
let
+1 -1
pkgs/desktops/gnome/core/gnome-software/default.nix
···
}:
let
-
withFwupd = stdenv.isx86_64 || stdenv.isi686;
+
withFwupd = stdenv.hostPlatform.isx86;
in
stdenv.mkDerivation rec {
+1 -1
pkgs/development/compilers/ocaml/ber-metaocaml.nix
···
}:
let
-
useX11 = stdenv.isi686 || stdenv.isx86_64;
+
useX11 = stdenv.hostPlatform.isx86;
x11deps = [ libX11 xorgproto ];
inherit (lib) optionals;
+2 -2
pkgs/development/compilers/sbcl/common.nix
···
{ lib, stdenv, fetchurl, fetchpatch, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
-
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system || "aarch64-darwin" == stdenv.hostPlatform.system)
-
, linkableRuntime ? (stdenv.isi686 || stdenv.isx86_64)
+
, threadSupport ? (stdenv.hostPlatform.isx86 || "aarch64-linux" == stdenv.hostPlatform.system || "aarch64-darwin" == stdenv.hostPlatform.system)
+
, linkableRuntime ? stdenv.hostPlatform.isx86
, disableImmobileSpace ? false
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
# Note that the created binaries still need `patchelf --set-interpreter ...`
+2 -2
pkgs/development/interpreters/clisp/default.nix
···
, libffcall
, coreutils
# build options
-
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64)
-
, x11Support ? (stdenv.isi686 || stdenv.isx86_64)
+
, threadSupport ? stdenv.hostPlatform.isx86
+
, x11Support ? stdenv.hostPlatform.isx86
, dllSupport ? true
, withModules ? [
"pcre"
+2 -2
pkgs/development/interpreters/clisp/hg.nix
···
, libffi, libffcall, automake
, coreutils
# build options
-
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64)
-
, x11Support ? (stdenv.isi686 || stdenv.isx86_64)
+
, threadSupport ? stdenv.hostPlatform.isx86
+
, x11Support ? stdenv.hostPlatform.isx86
, dllSupport ? true
, withModules ? [
"pcre"
+1 -1
pkgs/development/libraries/SDL2_gfx/default.nix
···
buildInputs = [ SDL2 ]
++ lib.optional stdenv.isDarwin darwin.libobjc;
-
configureFlags = [(if stdenv.isi686 || stdenv.isx86_64 then "--enable-mmx" else "--disable-mmx")]
+
configureFlags = [(if stdenv.hostPlatform.isx86 then "--enable-mmx" else "--disable-mmx")]
++ lib.optional stdenv.isDarwin "--disable-sdltest";
meta = with lib; {
+1 -1
pkgs/development/libraries/glibc/common.nix
···
"--enable-bind-now"
(lib.withFeatureAs withLinuxHeaders "headers" "${linuxHeaders}/include")
(lib.enableFeature profilingLibraries "profile")
-
] ++ lib.optionals (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isAarch64) [
+
] ++ lib.optionals (stdenv.hostPlatform.isx86 || stdenv.hostPlatform.isAarch64) [
# This feature is currently supported on
# i386, x86_64 and x32 with binutils 2.29 or later,
# and on aarch64 with binutils 2.30 or later.
+1 -1
pkgs/development/libraries/libimagequant/default.nix
···
patchShebangs ./configure
'';
-
configureFlags = lib.optionals (!stdenv.isi686 && !stdenv.isx86_64) [ "--disable-sse" ];
+
configureFlags = lib.optionals (!stdenv.hostPlatform.isx86) [ "--disable-sse" ];
meta = with lib; {
homepage = "https://pngquant.org/lib/";
+1 -1
pkgs/development/libraries/opencolorio/1.x.nix
···
# External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
"-DUSE_EXTERNAL_YAML=OFF"
] ++ lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
-
++ lib.optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DOCIO_USE_SSE=OFF";
+
++ lib.optional (!stdenv.hostPlatform.isx86) "-DOCIO_USE_SSE=OFF";
postInstall = ''
mkdir -p $bin/bin; mv $out/bin $bin/
+1 -1
pkgs/development/libraries/pcl/default.nix
···
# remove attempt to prevent (x86/x87-specific) extended precision use
# when SSE not detected
-
postPatch = lib.optionalString (!(stdenv.isi686 || stdenv.isx86_64)) ''
+
postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
sed -i '/-ffloat-store/d' cmake/pcl_find_sse.cmake
'';
+1 -1
pkgs/development/libraries/x264/default.nix
···
++ lib.optional (!stdenv.isi686) "--enable-pic"
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}";
-
nativeBuildInputs = lib.optional (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isi686) nasm;
+
nativeBuildInputs = lib.optional stdenv.hostPlatform.isx86 nasm;
meta = with lib; {
description = "Library for encoding H264/AVC video streams";
+1 -1
pkgs/development/python-modules/pyqtgraph/default.nix
···
export FONTCONFIG_FILE=${fontsConf}
'';
-
disabledTests = lib.optionals (!(stdenv.isi686 || stdenv.isx86_64)) [
+
disabledTests = lib.optionals (!stdenv.hostPlatform.isx86) [
# small precision-related differences on other architectures,
# upstream doesn't consider it serious.
# https://github.com/pyqtgraph/pyqtgraph/issues/2110
+1 -1
pkgs/os-specific/linux/fbterm/default.nix
···
sha256 = "0pciv5by989vzvjxsv1jsv4bdp4m8j0nfbl29jm5fwi12w4603vj";
};
buildInputs = [ gpm freetype fontconfig ncurses ]
-
++ lib.optional (stdenv.isi686 || stdenv.isx86_64) libx86;
+
++ lib.optional stdenv.hostPlatform.isx86 libx86;
in
stdenv.mkDerivation {
inherit (s) pname version;
+1 -1
pkgs/os-specific/linux/firmware/fwupd/default.nix
···
setuptools
]);
-
isx86 = stdenv.isx86_64 || stdenv.isi686;
+
isx86 = stdenv.hostPlatform.isx86;
# Dell isn't supported on Aarch64
haveDell = isx86;
+2 -2
pkgs/os-specific/linux/read-edid/default.nix
···
};
nativeBuildInputs = [ cmake ];
-
buildInputs = lib.optional (stdenv.isi686 || stdenv.isx86_64) libx86;
+
buildInputs = lib.optional stdenv.hostPlatform.isx86 libx86;
-
cmakeFlags = [ "-DCLASSICBUILD=${if stdenv.isi686 || stdenv.isx86_64 then "ON" else "OFF"}" ];
+
cmakeFlags = [ "-DCLASSICBUILD=${if stdenv.hostPlatform.isx86 then "ON" else "OFF"}" ];
patchPhase = ''
substituteInPlace CMakeLists.txt --replace 'COPYING' 'LICENSE'
+1 -1
pkgs/os-specific/linux/rtl8812au/default.nix
···
makeFlags = [
"ARCH=${stdenv.hostPlatform.linuxArch}"
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
-
("CONFIG_PLATFORM_I386_PC=" + (if (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) then "y" else "n"))
+
("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n"))
("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n"))
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+1 -1
pkgs/tools/graphics/pngquant/default.nix
···
preConfigure = "patchShebangs .";
-
configureFlags = lib.optionals (!stdenv.isi686 && !stdenv.isx86_64) [ "--disable-sse" ];
+
configureFlags = lib.optionals (!stdenv.hostPlatform.isx86) [ "--disable-sse" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libpng zlib lcms2 ];
+3 -3
pkgs/tools/misc/ipxe/default.nix
···
"bin-x86_64-efi/ipxe.efi" = null;
"bin-x86_64-efi/ipxe.efirom" = null;
"bin-x86_64-efi/ipxe.usb" = "ipxe-efi.usb";
-
} // lib.optionalAttrs (stdenv.isi686 || stdenv.isx86_64) {
+
} // lib.optionalAttrs stdenv.hostPlatform.isx86 {
"bin/ipxe.dsk" = null;
"bin/ipxe.usb" = null;
"bin/ipxe.iso" = null;
···
pname = "ipxe";
version = "1.21.1";
-
nativeBuildInputs = [ perl cdrkit xz openssl gnu-efi mtools ] ++ lib.optional (stdenv.isi686 || stdenv.isx86_64) syslinux;
+
nativeBuildInputs = [ perl cdrkit xz openssl gnu-efi mtools ] ++ lib.optional stdenv.hostPlatform.isx86 syslinux;
src = fetchFromGitHub {
owner = "ipxe";
···
makeFlags =
[ "ECHO_E_BIN_ECHO=echo" "ECHO_E_BIN_ECHO_E=echo" # No /bin/echo here.
-
] ++ lib.optionals (stdenv.isi686 || stdenv.isx86_64) [
+
] ++ lib.optionals stdenv.hostPlatform.isx86 [
"ISOLINUX_BIN_LIST=${syslinux}/share/syslinux/isolinux.bin"
"LDLINUX_C32=${syslinux}/share/syslinux/ldlinux.c32"
] ++ lib.optional (embedScript != null) "EMBED=${embedScript}";
+1 -1
pkgs/tools/networking/fastd/default.nix
···
];
# some options are only available on x86
-
mesonFlags = lib.optionals (!stdenv.isx86_64 && !stdenv.isi686) [
+
mesonFlags = lib.optionals (!stdenv.hostPlatform.isx86) [
"-Dcipher_salsa20_xmm=disabled"
"-Dcipher_salsa2012_xmm=disabled"
"-Dmac_ghash_pclmulqdq=disabled"
+1 -1
pkgs/tools/security/mkp224o/default.nix
···
variants = [
{ suffix = "ref10"; configureFlags = ["--enable-ref10"]; }
{ suffix = "donna"; configureFlags = ["--enable-donna"]; }
-
] ++ lib.optionals (stdenv.isi686 || stdenv.isx86_64) [
+
] ++ lib.optionals stdenv.hostPlatform.isx86 [
{ suffix = "donna-sse2"; configureFlags = ["--enable-donna-sse2"]; }
] ++ lib.optionals stdenv.isx86_64 [
{ suffix = "amd64-51-30k"; configureFlags = ["--enable-amd64-51-30k"]; }
+1 -1
pkgs/top-level/all-packages.nix
···
if ccWrapper.isGNU then ccWrapper.overrideAttrs(old: {
cc = old.cc.override {
reproducibleBuild = false;
-
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
+
profiledCompiler = with stdenv; (!isDarwin && hostPlatform.isx86);
}) else ccWrapper;