From c7e0f6b9050553dfa8dff259a0536326ac43b0ff Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 13 Nov 2023 06:47:08 -0800 Subject: treewide: s_targetPlatform_hostPlatform_ in non-compiler packages stdenv.targetPlatform really shouldn't be used by software that doesn't generate or manipulate binaries. I reviewed all uses of targetPlatform outside of pkgs/development/compilers and pkgs/stdenv and replaced those which weren't involved in something which fits these criteria. --- .../interpreters/acl2/libipasirglucose4/default.nix | 2 +- pkgs/development/interpreters/tinyscheme/default.nix | 2 +- pkgs/development/libraries/SDL2/default.nix | 4 ++-- pkgs/development/libraries/audio/zita-resampler/default.nix | 2 +- pkgs/development/libraries/blst/default.nix | 4 ++-- pkgs/development/libraries/cctz/default.nix | 4 ++-- pkgs/development/libraries/ffmpeg/generic.nix | 6 +++--- pkgs/development/libraries/libcef/default.nix | 2 +- pkgs/development/libraries/libsodium/default.nix | 8 ++++---- pkgs/development/libraries/libusb1/default.nix | 2 +- pkgs/development/libraries/mtxclient/default.nix | 2 +- pkgs/development/libraries/multipart-parser-c/default.nix | 2 +- pkgs/development/libraries/ntl/default.nix | 2 +- pkgs/development/libraries/protobuf/generic.nix | 4 ++-- pkgs/development/libraries/relibc/default.nix | 3 +-- pkgs/development/libraries/science/math/libtorch/bin.nix | 2 +- pkgs/development/libraries/science/math/zn_poly/default.nix | 2 +- pkgs/development/libraries/startup-notification/default.nix | 2 +- pkgs/development/libraries/tk/generic.nix | 2 +- pkgs/development/libraries/v8/default.nix | 2 +- pkgs/development/libraries/vapoursynth/plugin-interface.nix | 2 +- pkgs/development/libraries/wayland/protocols.nix | 2 +- pkgs/development/python-modules/distlib/default.nix | 2 +- pkgs/development/python-modules/jaxlib/default.nix | 10 +++++----- pkgs/development/python-modules/mido/default.nix | 2 +- pkgs/development/python-modules/mpv/default.nix | 2 +- pkgs/development/python-modules/mysql-connector/default.nix | 2 +- pkgs/development/python-modules/testpath/default.nix | 2 +- pkgs/development/python-modules/torch/default.nix | 2 +- pkgs/development/tools/azure-functions-core-tools/default.nix | 2 +- pkgs/development/tools/azure-static-sites-client/default.nix | 2 +- pkgs/development/tools/faas-cli/default.nix | 2 +- 32 files changed, 45 insertions(+), 46 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/interpreters/acl2/libipasirglucose4/default.nix b/pkgs/development/interpreters/acl2/libipasirglucose4/default.nix index c31e0dbe67f73..e59d2ed7c176a 100644 --- a/pkgs/development/interpreters/acl2/libipasirglucose4/default.nix +++ b/pkgs/development/interpreters/acl2/libipasirglucose4/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { # that as the version number, I guess. version = "2017"; - libname = pname + stdenv.targetPlatform.extensions.sharedLibrary; + libname = pname + stdenv.hostPlatform.extensions.sharedLibrary; src = fetchurl { url = "https://baldur.iti.kit.edu/sat-competition-2017/solvers/incremental/glucose-ipasir.zip"; diff --git a/pkgs/development/interpreters/tinyscheme/default.nix b/pkgs/development/interpreters/tinyscheme/default.nix index 1b298af4ac492..fef3f5daceeb0 100644 --- a/pkgs/development/interpreters/tinyscheme/default.nix +++ b/pkgs/development/interpreters/tinyscheme/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # We want to have the makefile pick up $CC, etc. so that we don't have # to unnecessarily tie this package to the GCC stdenv. ./02-use-toolchain-env-vars.patch - ] ++ lib.optionals stdenv.targetPlatform.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # On macOS the library suffix is .dylib: ./03-macOS-SOsuf.patch ]; diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index 2c05252c84734..dea308d59a2e4 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -9,7 +9,7 @@ , libGL , alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid , alsa-lib -, x11Support ? !stdenv.targetPlatform.isWindows && !stdenv.hostPlatform.isAndroid +, x11Support ? !stdenv.hostPlatform.isWindows && !stdenv.hostPlatform.isAndroid , libX11 , xorgproto , libICE @@ -122,7 +122,7 @@ stdenv.mkDerivation (finalAttrs: { "--disable-oss" ] ++ lib.optional (!x11Support) "--without-x" ++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib" - ++ lib.optional stdenv.targetPlatform.isWindows "--disable-video-opengles" + ++ lib.optional stdenv.hostPlatform.isWindows "--disable-video-opengles" ++ lib.optional stdenv.isDarwin "--disable-sdltest"; # We remove libtool .la files when static libs are requested, diff --git a/pkgs/development/libraries/audio/zita-resampler/default.nix b/pkgs/development/libraries/audio/zita-resampler/default.nix index 075ce33ef9e2e..70054134767ae 100644 --- a/pkgs/development/libraries/audio/zita-resampler/default.nix +++ b/pkgs/development/libraries/audio/zita-resampler/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { cd source substituteInPlace Makefile \ --replace 'ldconfig' "" - '' + lib.optionalString (!stdenv.targetPlatform.isx86_64) '' + '' + lib.optionalString (!stdenv.hostPlatform.isx86_64) '' substituteInPlace Makefile \ --replace '-DENABLE_SSE2' "" ''; diff --git a/pkgs/development/libraries/blst/default.nix b/pkgs/development/libraries/blst/default.nix index ef174d1118a9e..48865cf83564d 100644 --- a/pkgs/development/libraries/blst/default.nix +++ b/pkgs/development/libraries/blst/default.nix @@ -14,8 +14,8 @@ stdenv.mkDerivation ( finalAttrs: { buildPhase = '' runHook preBuild - ./build.sh ${lib.optionalString stdenv.targetPlatform.isWindows "flavour=mingw64"} - ./build.sh -shared ${lib.optionalString stdenv.targetPlatform.isWindows "flavour=mingw64"} + ./build.sh ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"} + ./build.sh -shared ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"} runHook postBuild ''; diff --git a/pkgs/development/libraries/cctz/default.nix b/pkgs/development/libraries/cctz/default.nix index f1c1a272b5f91..0b945c8c5990a 100644 --- a/pkgs/development/libraries/cctz/default.nix +++ b/pkgs/development/libraries/cctz/default.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { buildInputs = lib.optional stdenv.isDarwin Foundation; installTargets = [ "install_hdrs" ] - ++ lib.optional (!stdenv.targetPlatform.isStatic) "install_shared_lib" - ++ lib.optional stdenv.targetPlatform.isStatic "install_lib"; + ++ lib.optional (!stdenv.hostPlatform.isStatic) "install_shared_lib" + ++ lib.optional stdenv.hostPlatform.isStatic "install_lib"; postInstall = lib.optionalString stdenv.isDarwin '' install_name_tool -id $out/lib/libcctz.so $out/lib/libcctz.so diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 57235b24308de..e713ca1413fb3 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -52,7 +52,7 @@ , withLadspa ? withFullDeps # LADSPA audio filtering , withLibplacebo ? withFullDeps && !stdenv.isDarwin # libplacebo video processing library , withLzma ? withHeadlessDeps # xz-utils -, withMfx ? withFullDeps && (with stdenv.targetPlatform; isLinux && !isAarch) # Hardware acceleration via intel-media-sdk/libmfx +, withMfx ? withFullDeps && (with stdenv.hostPlatform; isLinux && !isAarch) # Hardware acceleration via intel-media-sdk/libmfx , withModplug ? withFullDeps && !stdenv.isDarwin # ModPlug support , withMp3lame ? withHeadlessDeps # LAME MP3 encoder , withMysofa ? withFullDeps # HRTF support via SOFAlizer @@ -386,8 +386,8 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withHardcodedTables "hardcoded-tables") (enableFeature withSafeBitstreamReader "safe-bitstream-reader") - (enableFeature (withMultithread && stdenv.targetPlatform.isUnix) "pthreads") - (enableFeature (withMultithread && stdenv.targetPlatform.isWindows) "w32threads") + (enableFeature (withMultithread && stdenv.hostPlatform.isUnix) "pthreads") + (enableFeature (withMultithread && stdenv.hostPlatform.isWindows) "w32threads") "--disable-os2threads" # We don't support OS/2 (enableFeature withNetwork "network") diff --git a/pkgs/development/libraries/libcef/default.nix b/pkgs/development/libraries/libcef/default.nix index 5daca729bc738..2fb83097c02af 100644 --- a/pkgs/development/libraries/libcef/default.nix +++ b/pkgs/development/libraries/libcef/default.nix @@ -69,7 +69,7 @@ let platforms."aarch64-linux".sha256 = "12sp58nxa3nv800badv62vpvc30hyb0ykywdaxgv9y8pswp9lq0z"; platforms."x86_64-linux".sha256 = "0vzzwq1k6bv9d209yg3samvfnfwj7s58y9r3p3pd98wxa9iyzf4j"; - platformInfo = builtins.getAttr stdenv.targetPlatform.system platforms; + platformInfo = builtins.getAttr stdenv.hostPlatform.system platforms; in stdenv.mkDerivation rec { pname = "cef-binary"; diff --git a/pkgs/development/libraries/libsodium/default.nix b/pkgs/development/libraries/libsodium/default.nix index b4eeed32d5967..b3a00d89a5d53 100644 --- a/pkgs/development/libraries/libsodium/default.nix +++ b/pkgs/development/libraries/libsodium/default.nix @@ -13,18 +13,18 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" "dev" ]; - patches = lib.optional stdenv.targetPlatform.isMinGW ./mingw-no-fortify.patch; + patches = lib.optional stdenv.hostPlatform.isMinGW ./mingw-no-fortify.patch; - nativeBuildInputs = lib.optional stdenv.targetPlatform.isMinGW autoreconfHook; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isMinGW autoreconfHook; separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl"; enableParallelBuilding = true; - hardeningDisable = lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isx86_32) "stackprotector"; + hardeningDisable = lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) "stackprotector"; # FIXME: the hardeingDisable attr above does not seems effective, so # the need to disable stackprotector via configureFlags - configureFlags = lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isx86_32) "--disable-ssp"; + configureFlags = lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) "--disable-ssp"; doCheck = true; diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix index 326ee30281582..1f768a2cb261f 100644 --- a/pkgs/development/libraries/libusb1/default.nix +++ b/pkgs/development/libraries/libusb1/default.nix @@ -4,7 +4,7 @@ , fetchpatch , autoreconfHook , pkg-config -, enableUdev ? stdenv.isLinux && !stdenv.targetPlatform.isStatic +, enableUdev ? stdenv.isLinux && !stdenv.hostPlatform.isStatic , udev , libobjc , IOKit diff --git a/pkgs/development/libraries/mtxclient/default.nix b/pkgs/development/libraries/mtxclient/default.nix index dcba45f41c3dd..13816faefce9a 100644 --- a/pkgs/development/libraries/mtxclient/default.nix +++ b/pkgs/development/libraries/mtxclient/default.nix @@ -61,6 +61,6 @@ stdenv.mkDerivation rec { platforms = platforms.all; # Should be fixable if a higher clang version is used, see: # https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177 - broken = stdenv.targetPlatform.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/multipart-parser-c/default.nix b/pkgs/development/libraries/multipart-parser-c/default.nix index 45b0abdee71b9..89665f2efc9af 100644 --- a/pkgs/development/libraries/multipart-parser-c/default.nix +++ b/pkgs/development/libraries/multipart-parser-c/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/lib - mv lib*${stdenv.targetPlatform.extensions.sharedLibrary} $out/lib/ + mv lib*${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/ mkdir -p $out/include mv *.h $out/include/ diff --git a/pkgs/development/libraries/ntl/default.nix b/pkgs/development/libraries/ntl/default.nix index 9335bec35ce87..8fa37141628cc 100644 --- a/pkgs/development/libraries/ntl/default.nix +++ b/pkgs/development/libraries/ntl/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { "TUNE=${ if tune then "auto" - else if stdenv.targetPlatform.isx86 then + else if stdenv.hostPlatform.isx86 then "x86" # "chooses options that should be well suited for most x86 platforms" else "generic" # "chooses options that should be OK for most platforms" diff --git a/pkgs/development/libraries/protobuf/generic.nix b/pkgs/development/libraries/protobuf/generic.nix index bcef33b0cafa0..cf00d1d50bebb 100644 --- a/pkgs/development/libraries/protobuf/generic.nix +++ b/pkgs/development/libraries/protobuf/generic.nix @@ -76,7 +76,7 @@ stdenv.mkDerivation (finalAttrs: { ] # Tests fail to build on 32-bit platforms; fixed in 22.x # https://github.com/protocolbuffers/protobuf/issues/10418 - ++ lib.optionals (stdenv.targetPlatform.is32bit && lib.versionOlder version "22") [ + ++ lib.optionals (stdenv.hostPlatform.is32bit && lib.versionOlder version "22") [ "-Dprotobuf_BUILD_TESTS=OFF" ]; @@ -85,7 +85,7 @@ stdenv.mkDerivation (finalAttrs: { # https://hydra.nixos.org/build/235677717/nixlog/4/tail # Also AnyTest.TestPackFromSerializationExceedsSizeLimit fails on 32-bit platforms # https://github.com/protocolbuffers/protobuf/issues/8460 - doCheck = !(stdenv.isDarwin && lib.versionAtLeast version "23") && !stdenv.targetPlatform.is32bit; + doCheck = !(stdenv.isDarwin && lib.versionAtLeast version "23") && !stdenv.hostPlatform.is32bit; passthru = { tests = { diff --git a/pkgs/development/libraries/relibc/default.nix b/pkgs/development/libraries/relibc/default.nix index 3bc476ccc0f0b..437da86e8c21e 100644 --- a/pkgs/development/libraries/relibc/default.nix +++ b/pkgs/development/libraries/relibc/default.nix @@ -63,8 +63,7 @@ redoxRustPlatform.buildRustPackage rec { DESTDIR=$out make install ''; - # TODO: should be hostPlatform - TARGET = stdenvNoCC.targetPlatform.rust.rustcTargetSpec; + TARGET = stdenvNoCC.hostPlatform.rust.rustcTargetSpec; cargoLock = { lockFile = ./Cargo.lock; diff --git a/pkgs/development/libraries/science/math/libtorch/bin.nix b/pkgs/development/libraries/science/math/libtorch/bin.nix index a47d8260714ab..47a6249ebdc62 100644 --- a/pkgs/development/libraries/science/math/libtorch/bin.nix +++ b/pkgs/development/libraries/science/math/libtorch/bin.nix @@ -26,7 +26,7 @@ in stdenv.mkDerivation { inherit version; pname = "libtorch"; - src = fetchzip srcs."${stdenv.targetPlatform.system}-${device}" or unavailable; + src = fetchzip srcs."${stdenv.hostPlatform.system}-${device}" or unavailable; nativeBuildInputs = if stdenv.isDarwin then [ fixDarwinDylibNames ] diff --git a/pkgs/development/libraries/science/math/zn_poly/default.nix b/pkgs/development/libraries/science/math/zn_poly/default.nix index 13344db9ebc34..bdaf6e6284ef1 100644 --- a/pkgs/development/libraries/science/math/zn_poly/default.nix +++ b/pkgs/development/libraries/science/math/zn_poly/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { # name of library file ("libzn_poly.so") libbasename = "libzn_poly"; - libext = stdenv.targetPlatform.extensions.sharedLibrary; + libext = stdenv.hostPlatform.extensions.sharedLibrary; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; diff --git a/pkgs/development/libraries/startup-notification/default.nix b/pkgs/development/libraries/startup-notification/default.nix index c1c5819ad4219..bf84345be2d11 100644 --- a/pkgs/development/libraries/startup-notification/default.nix +++ b/pkgs/development/libraries/startup-notification/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a"; }; - configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.targetPlatform) [ + configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "lf_cv_sane_realloc=yes" ]; diff --git a/pkgs/development/libraries/tk/generic.nix b/pkgs/development/libraries/tk/generic.nix index ab973c957aed4..57a9b617d950d 100644 --- a/pkgs/development/libraries/tk/generic.nix +++ b/pkgs/development/libraries/tk/generic.nix @@ -22,7 +22,7 @@ tcl.mkTclDerivation { substituteInPlace $file --replace "exec wish" "exec $out/bin/wish" done '' - + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinMinVersion "11") '' + + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") '' substituteInPlace unix/configure* \ --replace " -framework UniformTypeIdentifiers" "" ''; diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index a9891a9d328c6..7edf2cdf7c46b 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -136,7 +136,7 @@ stdenv.mkDerivation rec { ++ lib.optional stdenv.isDarwin ''use_lld=false''; env.NIX_CFLAGS_COMPILE = "-O2"; - FORCE_MAC_SDK_MIN = stdenv.targetPlatform.sdkVer or "10.12"; + FORCE_MAC_SDK_MIN = stdenv.hostPlatform.sdkVer or "10.12"; nativeBuildInputs = [ myGn diff --git a/pkgs/development/libraries/vapoursynth/plugin-interface.nix b/pkgs/development/libraries/vapoursynth/plugin-interface.nix index 064893a3dbcd9..f962634b131e7 100644 --- a/pkgs/development/libraries/vapoursynth/plugin-interface.nix +++ b/pkgs/development/libraries/vapoursynth/plugin-interface.nix @@ -36,7 +36,7 @@ plugins: let $CC -shared -fPIC ${source} -o "$out/lib/libvapoursynth-nix-plugins${ext}" ''; - ext = stdenv.targetPlatform.extensions.sharedLibrary; + ext = stdenv.hostPlatform.extensions.sharedLibrary; in runCommand "${vapoursynth.name}-with-plugins" { nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/development/libraries/wayland/protocols.nix b/pkgs/development/libraries/wayland/protocols.nix index dc53bbb54d2a7..0fadb103ce33d 100644 --- a/pkgs/development/libraries/wayland/protocols.nix +++ b/pkgs/development/libraries/wayland/protocols.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { version = "1.32"; # https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/48 - doCheck = stdenv.hostPlatform == stdenv.buildPlatform && stdenv.targetPlatform.linker == "bfd" && wayland.withLibraries; + doCheck = stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.linker == "bfd" && wayland.withLibraries; src = fetchurl { url = "https://gitlab.freedesktop.org/wayland/${pname}/-/releases/${version}/downloads/${pname}-${version}.tar.xz"; diff --git a/pkgs/development/python-modules/distlib/default.nix b/pkgs/development/python-modules/distlib/default.nix index ca91e77a6672c..cf31574e6fdbd 100644 --- a/pkgs/development/python-modules/distlib/default.nix +++ b/pkgs/development/python-modules/distlib/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { setuptools ]; - postFixup = lib.optionalString (!stdenv.targetPlatform.isWindows) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isWindows) '' find $out -name '*.exe' -delete ''; diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix index ae479120ed1ae..c70ab0ac2b327 100644 --- a/pkgs/development/python-modules/jaxlib/default.nix +++ b/pkgs/development/python-modules/jaxlib/default.nix @@ -136,8 +136,8 @@ let arch = # KeyError: ('Linux', 'arm64') - if stdenv.targetPlatform.isLinux && stdenv.targetPlatform.linuxArch == "arm64" then "aarch64" - else stdenv.targetPlatform.linuxArch; + if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.linuxArch == "arm64" then "aarch64" + else stdenv.hostPlatform.linuxArch; bazel-build = buildBazelPackage rec { name = "bazel-build-${pname}-${version}"; @@ -219,7 +219,7 @@ let build --python_path="${python}/bin/python" build --distinct_host_configuration=false build --define PROTOBUF_INCLUDE_PATH="${pkgs.protobuf}/include" - '' + lib.optionalString (stdenv.targetPlatform.avxSupport && stdenv.targetPlatform.isUnix) '' + '' + lib.optionalString (stdenv.hostPlatform.avxSupport && stdenv.hostPlatform.isUnix) '' build --config=avx_posix '' + lib.optionalString mklSupport '' build --config=mkl_open_source_only @@ -298,13 +298,13 @@ let inherit meta; }; platformTag = - if stdenv.targetPlatform.isLinux then + if stdenv.hostPlatform.isLinux then "manylinux2014_${arch}" else if stdenv.system == "x86_64-darwin" then "macosx_10_9_${arch}" else if stdenv.system == "aarch64-darwin" then "macosx_11_0_${arch}" - else throw "Unsupported target platform: ${stdenv.targetPlatform}"; + else throw "Unsupported target platform: ${stdenv.hostPlatform}"; in buildPythonPackage { diff --git a/pkgs/development/python-modules/mido/default.nix b/pkgs/development/python-modules/mido/default.nix index 65702b23c7ad9..84fe78a594750 100644 --- a/pkgs/development/python-modules/mido/default.nix +++ b/pkgs/development/python-modules/mido/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { patches = [ (substituteAll { src = ./libportmidi-cdll.patch; - libportmidi = "${portmidi.out}/lib/libportmidi${stdenv.targetPlatform.extensions.sharedLibrary}"; + libportmidi = "${portmidi.out}/lib/libportmidi${stdenv.hostPlatform.extensions.sharedLibrary}"; }) ]; diff --git a/pkgs/development/python-modules/mpv/default.nix b/pkgs/development/python-modules/mpv/default.nix index c956bb90aa8f8..3763e25660a53 100644 --- a/pkgs/development/python-modules/mpv/default.nix +++ b/pkgs/development/python-modules/mpv/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace mpv.py \ --replace "sofile = ctypes.util.find_library('mpv')" \ - 'sofile = "${mpv}/lib/libmpv${stdenv.targetPlatform.extensions.sharedLibrary}"' + 'sofile = "${mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}"' ''; # tests impure, will error if it can't load libmpv.so diff --git a/pkgs/development/python-modules/mysql-connector/default.nix b/pkgs/development/python-modules/mysql-connector/default.nix index ba963ff0d5ddb..575c438eb5514 100644 --- a/pkgs/development/python-modules/mysql-connector/default.nix +++ b/pkgs/development/python-modules/mysql-connector/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { patches = [ # mysql-connector overrides MACOSX_DEPLOYMENT_TARGET to 11. # This makes the installation with nixpkgs fail. I suspect, that's - # because stdenv.targetPlatform.darwinSdkVersion is (currently) set to + # because stdenv.hostPlatform.darwinSdkVersion is (currently) set to # 10.12. The patch reverts # https://github.com/mysql/mysql-connector-python/commit/d1e89fd3d7391084cdf35b0806cb5d2a4b413654 ./0001-Revert-Fix-MacOS-wheels-platform-tag.patch diff --git a/pkgs/development/python-modules/testpath/default.nix b/pkgs/development/python-modules/testpath/default.nix index 5635a61561594..eb66bea56f573 100644 --- a/pkgs/development/python-modules/testpath/default.nix +++ b/pkgs/development/python-modules/testpath/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { # exe are only required when testpath is used on windows # https://github.com/jupyter/testpath/blob/de8ca59539eb23b9781e55848b7d2646c8c61df9/testpath/commands.py#L128 - preBuild = lib.optionalString (!stdenv.targetPlatform.isWindows) '' + preBuild = lib.optionalString (!stdenv.hostPlatform.isWindows) '' rm testpath/cli-32.exe testpath/cli-64.exe ''; diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index c9bf7c45766f0..4217b87e81e7c 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -189,7 +189,7 @@ in buildPythonPackage rec { '' # error: no member named 'aligned_alloc' in the global namespace; did you mean simply 'aligned_alloc' # This lib overrided aligned_alloc hence the error message. Tltr: his function is linkable but not in header. - + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "11.0") '' + + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0") '' substituteInPlace third_party/pocketfft/pocketfft_hdronly.h --replace '#if __cplusplus >= 201703L inline void *aligned_alloc(size_t align, size_t size)' '#if __cplusplus >= 201703L && 0 inline void *aligned_alloc(size_t align, size_t size)' diff --git a/pkgs/development/tools/azure-functions-core-tools/default.nix b/pkgs/development/tools/azure-functions-core-tools/default.nix index e187dbf6b3937..cf039c5758f5e 100644 --- a/pkgs/development/tools/azure-functions-core-tools/default.nix +++ b/pkgs/development/tools/azure-functions-core-tools/default.nix @@ -27,7 +27,7 @@ }; }; - platformInfo = builtins.getAttr stdenv.targetPlatform.system platforms; + platformInfo = builtins.getAttr stdenv.hostPlatform.system platforms; in stdenv.mkDerivation rec { pname = "azure-functions-core-tools"; diff --git a/pkgs/development/tools/azure-static-sites-client/default.nix b/pkgs/development/tools/azure-static-sites-client/default.nix index 5ac8f971cf35a..441496ed4352c 100644 --- a/pkgs/development/tools/azure-static-sites-client/default.nix +++ b/pkgs/development/tools/azure-static-sites-client/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { pname = "StaticSitesClient-${versionFlavor}"; version = flavor.buildId; - src = sources.${stdenv.targetPlatform.system} or (throw "Unsupported platform"); + src = sources.${stdenv.hostPlatform.system} or (throw "Unsupported platform"); nativeBuildInputs = [ autoPatchelfHook diff --git a/pkgs/development/tools/faas-cli/default.nix b/pkgs/development/tools/faas-cli/default.nix index 383ca09294491..026dbbcc54828 100644 --- a/pkgs/development/tools/faas-cli/default.nix +++ b/pkgs/development/tools/faas-cli/default.nix @@ -37,7 +37,7 @@ buildGoModule rec { "-s" "-w" "-X github.com/openfaas/faas-cli/version.GitCommit=ref/tags/${version}" "-X github.com/openfaas/faas-cli/version.Version=${version}" - "-X github.com/openfaas/faas-cli/commands.Platform=${faasPlatform stdenv.targetPlatform}" + "-X github.com/openfaas/faas-cli/commands.Platform=${faasPlatform stdenv.hostPlatform}" ]; nativeBuildInputs = [ makeWrapper installShellFiles ]; -- cgit 1.4.1