From 2175b157acf1fd338021bc162ec7c4d6d7f90306 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 20 Nov 2021 17:50:41 -0800 Subject: treewide: refactor isi686 && isx86_64 -> isx86 --- pkgs/applications/graphics/krita/generic.nix | 2 +- pkgs/applications/science/logic/monosat/default.nix | 2 +- pkgs/applications/video/mplayer/default.nix | 2 +- pkgs/build-support/vm/default.nix | 2 +- pkgs/desktops/gnome/core/gnome-software/default.nix | 2 +- pkgs/development/compilers/ocaml/ber-metaocaml.nix | 2 +- pkgs/development/compilers/sbcl/common.nix | 4 ++-- pkgs/development/interpreters/clisp/default.nix | 4 ++-- pkgs/development/interpreters/clisp/hg.nix | 4 ++-- pkgs/development/libraries/SDL2_gfx/default.nix | 2 +- pkgs/development/libraries/glibc/common.nix | 2 +- pkgs/development/libraries/libimagequant/default.nix | 2 +- pkgs/development/libraries/opencolorio/1.x.nix | 2 +- pkgs/development/libraries/pcl/default.nix | 2 +- pkgs/development/libraries/x264/default.nix | 2 +- pkgs/development/python-modules/pyqtgraph/default.nix | 2 +- pkgs/os-specific/linux/fbterm/default.nix | 2 +- pkgs/os-specific/linux/firmware/fwupd/default.nix | 2 +- pkgs/os-specific/linux/read-edid/default.nix | 4 ++-- pkgs/os-specific/linux/rtl8812au/default.nix | 2 +- pkgs/tools/graphics/pngquant/default.nix | 2 +- pkgs/tools/misc/ipxe/default.nix | 6 +++--- pkgs/tools/networking/fastd/default.nix | 2 +- pkgs/tools/security/mkp224o/default.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- 25 files changed, 31 insertions(+), 31 deletions(-) (limited to 'pkgs') diff --git a/pkgs/applications/graphics/krita/generic.nix b/pkgs/applications/graphics/krita/generic.nix index efaf341b1f6..a0819a203e7 100644 --- a/pkgs/applications/graphics/krita/generic.nix +++ b/pkgs/applications/graphics/krita/generic.nix @@ -32,7 +32,7 @@ mkDerivation rec { 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"; diff --git a/pkgs/applications/science/logic/monosat/default.nix b/pkgs/applications/science/logic/monosat/default.nix index b26c122064a..1356c88d478 100644 --- a/pkgs/applications/science/logic/monosat/default.nix +++ b/pkgs/applications/science/logic/monosat/default.nix @@ -31,7 +31,7 @@ let # 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' ''; diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index 644e35468fb..1715ce4a6a1 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -174,7 +174,7 @@ stdenv.mkDerivation rec { (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" diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 09a56fda7b7..3f176db36c2 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -5,7 +5,7 @@ , 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 diff --git a/pkgs/desktops/gnome/core/gnome-software/default.nix b/pkgs/desktops/gnome/core/gnome-software/default.nix index 7ee3a51aba2..61edbe9679d 100644 --- a/pkgs/desktops/gnome/core/gnome-software/default.nix +++ b/pkgs/desktops/gnome/core/gnome-software/default.nix @@ -37,7 +37,7 @@ }: let - withFwupd = stdenv.isx86_64 || stdenv.isi686; + withFwupd = stdenv.hostPlatform.isx86; in stdenv.mkDerivation rec { diff --git a/pkgs/development/compilers/ocaml/ber-metaocaml.nix b/pkgs/development/compilers/ocaml/ber-metaocaml.nix index d3ab0d6e1c6..895706312c1 100644 --- a/pkgs/development/compilers/ocaml/ber-metaocaml.nix +++ b/pkgs/development/compilers/ocaml/ber-metaocaml.nix @@ -4,7 +4,7 @@ }: let - useX11 = stdenv.isi686 || stdenv.isx86_64; + useX11 = stdenv.hostPlatform.isx86; x11deps = [ libX11 xorgproto ]; inherit (lib) optionals; diff --git a/pkgs/development/compilers/sbcl/common.nix b/pkgs/development/compilers/sbcl/common.nix index d2450315eb5..9cfb38109f7 100644 --- a/pkgs/development/compilers/sbcl/common.nix +++ b/pkgs/development/compilers/sbcl/common.nix @@ -2,8 +2,8 @@ { 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 ...` diff --git a/pkgs/development/interpreters/clisp/default.nix b/pkgs/development/interpreters/clisp/default.nix index 137ebbccbc7..2a387d34f47 100644 --- a/pkgs/development/interpreters/clisp/default.nix +++ b/pkgs/development/interpreters/clisp/default.nix @@ -9,8 +9,8 @@ , 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" diff --git a/pkgs/development/interpreters/clisp/hg.nix b/pkgs/development/interpreters/clisp/hg.nix index 83a1870d182..7ab4134facb 100644 --- a/pkgs/development/interpreters/clisp/hg.nix +++ b/pkgs/development/interpreters/clisp/hg.nix @@ -8,8 +8,8 @@ , 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" diff --git a/pkgs/development/libraries/SDL2_gfx/default.nix b/pkgs/development/libraries/SDL2_gfx/default.nix index 783dedc5c78..3d599c39c05 100644 --- a/pkgs/development/libraries/SDL2_gfx/default.nix +++ b/pkgs/development/libraries/SDL2_gfx/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { 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; { diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 91281f9cd24..57c2e259e06 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -161,7 +161,7 @@ stdenv.mkDerivation ({ "--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. diff --git a/pkgs/development/libraries/libimagequant/default.nix b/pkgs/development/libraries/libimagequant/default.nix index 8a575141148..348f610bf18 100644 --- a/pkgs/development/libraries/libimagequant/default.nix +++ b/pkgs/development/libraries/libimagequant/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { 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/"; diff --git a/pkgs/development/libraries/opencolorio/1.x.nix b/pkgs/development/libraries/opencolorio/1.x.nix index 041ddf8e837..1b58faf5443 100644 --- a/pkgs/development/libraries/opencolorio/1.x.nix +++ b/pkgs/development/libraries/opencolorio/1.x.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # 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/ diff --git a/pkgs/development/libraries/pcl/default.nix b/pkgs/development/libraries/pcl/default.nix index 8afcdbf33f2..bbc2bd8cc6f 100644 --- a/pkgs/development/libraries/pcl/default.nix +++ b/pkgs/development/libraries/pcl/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { # 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 ''; diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index 57d0c0a4d63..2c9f476313e 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ++ 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"; diff --git a/pkgs/development/python-modules/pyqtgraph/default.nix b/pkgs/development/python-modules/pyqtgraph/default.nix index 854af36e5bc..af5567acc8d 100644 --- a/pkgs/development/python-modules/pyqtgraph/default.nix +++ b/pkgs/development/python-modules/pyqtgraph/default.nix @@ -53,7 +53,7 @@ buildPythonPackage rec { 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 diff --git a/pkgs/os-specific/linux/fbterm/default.nix b/pkgs/os-specific/linux/fbterm/default.nix index 4fdbb06c521..ecf1b5e2b31 100644 --- a/pkgs/os-specific/linux/fbterm/default.nix +++ b/pkgs/os-specific/linux/fbterm/default.nix @@ -9,7 +9,7 @@ let 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; diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index 0333a9e4310..e6c43c0aa6e 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -58,7 +58,7 @@ let setuptools ]); - isx86 = stdenv.isx86_64 || stdenv.isi686; + isx86 = stdenv.hostPlatform.isx86; # Dell isn't supported on Aarch64 haveDell = isx86; diff --git a/pkgs/os-specific/linux/read-edid/default.nix b/pkgs/os-specific/linux/read-edid/default.nix index 24ad0674976..7f6d224ff4d 100644 --- a/pkgs/os-specific/linux/read-edid/default.nix +++ b/pkgs/os-specific/linux/read-edid/default.nix @@ -10,9 +10,9 @@ stdenv.mkDerivation rec { }; 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' diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix index 1aab3e03cd9..b385b9a27da 100644 --- a/pkgs/os-specific/linux/rtl8812au/default.nix +++ b/pkgs/os-specific/linux/rtl8812au/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { 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}" diff --git a/pkgs/tools/graphics/pngquant/default.nix b/pkgs/tools/graphics/pngquant/default.nix index bb0ef858125..dd145d48fc1 100644 --- a/pkgs/tools/graphics/pngquant/default.nix +++ b/pkgs/tools/graphics/pngquant/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { 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 ]; diff --git a/pkgs/tools/misc/ipxe/default.nix b/pkgs/tools/misc/ipxe/default.nix index 70b1ae48ae9..76ce66e5686 100644 --- a/pkgs/tools/misc/ipxe/default.nix +++ b/pkgs/tools/misc/ipxe/default.nix @@ -9,7 +9,7 @@ let "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; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { 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"; @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { 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}"; diff --git a/pkgs/tools/networking/fastd/default.nix b/pkgs/tools/networking/fastd/default.nix index 8d1594b8187..47007e1646e 100644 --- a/pkgs/tools/networking/fastd/default.nix +++ b/pkgs/tools/networking/fastd/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { ]; # 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" diff --git a/pkgs/tools/security/mkp224o/default.nix b/pkgs/tools/security/mkp224o/default.nix index dc17cc60276..17d8e8ad4ff 100644 --- a/pkgs/tools/security/mkp224o/default.nix +++ b/pkgs/tools/security/mkp224o/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { 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"]; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e1dc55d20c1..78472c9abba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11607,7 +11607,7 @@ with pkgs; 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; -- cgit 1.4.1