treewide: {build,host,target}Platform -> stdenv.{build,host,target}Platform

Artturin 2eeb34c2 ecab3ede

+39 -45
+2 -2
nixos/modules/programs/steam.nix
··· 12 12 type = types.package; 13 13 default = pkgs.steam.override { 14 14 extraLibraries = pkgs: with config.hardware.opengl; 15 - if pkgs.hostPlatform.is64bit 15 + if pkgs.stdenv.hostPlatform.is64bit 16 16 then [ package ] ++ extraPackages 17 17 else [ package32 ] ++ extraPackages32; 18 18 }; 19 19 defaultText = literalExpression '' 20 20 pkgs.steam.override { 21 21 extraLibraries = pkgs: with config.hardware.opengl; 22 - if pkgs.hostPlatform.is64bit 22 + if pkgs.stdenv.hostPlatform.is64bit 23 23 then [ package ] ++ extraPackages 24 24 else [ package32 ] ++ extraPackages32; 25 25 }
+3 -3
nixos/modules/services/misc/nix-daemon.nix
··· 819 819 820 820 system-features = mkDefault ( 821 821 [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++ 822 - optionals (pkgs.hostPlatform ? gcc.arch) ( 822 + optionals (pkgs.stdenv.hostPlatform ? gcc.arch) ( 823 823 # a builder can run code for `gcc.arch` and inferior architectures 824 - [ "gccarch-${pkgs.hostPlatform.gcc.arch}" ] ++ 825 - map (x: "gccarch-${x}") (systems.architectures.inferiors.${pkgs.hostPlatform.gcc.arch} or []) 824 + [ "gccarch-${pkgs.stdenv.hostPlatform.gcc.arch}" ] ++ 825 + map (x: "gccarch-${x}") (systems.architectures.inferiors.${pkgs.stdenv.hostPlatform.gcc.arch} or []) 826 826 ) 827 827 ); 828 828 }
+1 -1
nixos/tests/libvirtd.nix
··· 21 21 }; 22 22 23 23 testScript = let 24 - nixosInstallISO = (import ../release.nix {}).iso_minimal.${pkgs.hostPlatform.system}; 24 + nixosInstallISO = (import ../release.nix {}).iso_minimal.${pkgs.stdenv.hostPlatform.system}; 25 25 virshShutdownCmd = if pkgs.stdenv.isx86_64 then "shutdown" else "destroy"; 26 26 in '' 27 27 start_all()
+2 -2
pkgs/applications/blockchains/zcash/default.nix
··· 1 1 { autoreconfHook, boost180, cargo, coreutils, curl, cxx-rs, db62, fetchFromGitHub 2 - , hexdump, hostPlatform, lib, libevent, libsodium, makeWrapper, rust, rustPlatform 2 + , hexdump, lib, libevent, libsodium, makeWrapper, rust, rustPlatform 3 3 , pkg-config, Security, stdenv, testers, utf8cpp, util-linux, zcash, zeromq 4 4 }: 5 5 ··· 82 82 license = licenses.mit; 83 83 84 84 # https://github.com/zcash/zcash/issues/4405 85 - broken = hostPlatform.isAarch64 && hostPlatform.isDarwin; 85 + broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin; 86 86 }; 87 87 }
+1 -1
pkgs/applications/editors/emacs/generic.nix
··· 13 13 , alsa-lib, cairo, acl, gpm, m17n_lib, libotf 14 14 , sigtool, jansson, harfbuzz, sqlite, nixosTests 15 15 , recurseIntoAttrs, emacsPackagesFor 16 - , libgccjit, targetPlatform, makeWrapper # native-comp params 16 + , libgccjit, makeWrapper # native-comp params 17 17 , fetchFromSavannah, fetchFromBitbucket 18 18 19 19 # macOS dependencies for NS and macPort
+1 -2
pkgs/applications/misc/HentaiAtHome/default.nix
··· 1 1 { buildPackages 2 - , buildPlatform 3 2 , fetchzip 4 3 , javaOpts ? "-XX:+UseZGC" 5 4 , jdk ··· 23 22 nativeBuildInputs = [ jdk makeWrapper ]; 24 23 25 24 LANG = "en_US.UTF-8"; 26 - LOCALE_ARCHIVE = lib.optionalString (buildPlatform.libc == "glibc") 25 + LOCALE_ARCHIVE = lib.optionalString (stdenvNoCC.buildPlatform.libc == "glibc") 27 26 "${buildPackages.glibcLocales}/lib/locale/locale-archive"; 28 27 29 28 buildPhase = ''
+1 -2
pkgs/applications/science/logic/cedille/default.nix
··· 4 4 , alex 5 5 , happy 6 6 , Agda 7 - , buildPlatform 8 7 , buildPackages 9 8 , ghcWithPackages 10 9 }: ··· 30 29 31 30 LANG = "en_US.UTF-8"; 32 31 LOCALE_ARCHIVE = 33 - lib.optionalString (buildPlatform.libc == "glibc") 32 + lib.optionalString (stdenv.buildPlatform.libc == "glibc") 34 33 "${buildPackages.glibcLocales}/lib/locale/locale-archive"; 35 34 36 35 postPatch = ''
+1 -2
pkgs/applications/video/davinci-resolve/default.nix
··· 3 3 , cacert 4 4 , curl 5 5 , runCommandLocal 6 - , targetPlatform 7 6 , unzip 8 7 , appimage-run 9 8 , addOpenGLRunpath ··· 49 48 SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}"; 50 49 51 50 USERAGENT = builtins.concatStringsSep " " [ 52 - "User-Agent: Mozilla/5.0 (X11; Linux ${targetPlatform.linuxArch})" 51 + "User-Agent: Mozilla/5.0 (X11; Linux ${stdenv.targetPlatform.linuxArch})" 53 52 "AppleWebKit/537.36 (KHTML, like Gecko)" 54 53 "Chrome/77.0.3865.75" 55 54 "Safari/537.36"
+4 -4
pkgs/applications/video/losslesscut-bin/default.nix
··· 1 1 { lib 2 + , stdenv 2 3 , callPackage 3 4 , buildPackages 4 - , hostPlatform 5 5 }: 6 6 7 7 let ··· 34 34 }; 35 35 in 36 36 ( 37 - if hostPlatform.system == "aarch64-darwin" then aarch64-dmg 38 - else if hostPlatform.isDarwin then x86_64-dmg 39 - else if hostPlatform.isCygwin then x86_64-windows 37 + if stdenv.hostPlatform.system == "aarch64-darwin" then aarch64-dmg 38 + else if stdenv.hostPlatform.isDarwin then x86_64-dmg 39 + else if stdenv.hostPlatform.isCygwin then x86_64-windows 40 40 else x86_64-appimage 41 41 ).overrideAttrs 42 42 (oldAttrs: {
+1 -2
pkgs/build-support/flutter/default.nix
··· 26 26 , git 27 27 , dart 28 28 , nukeReferences 29 - , targetPlatform 30 29 , bash 31 30 , curl 32 31 , unzip ··· 57 56 self = 58 57 (self: llvmPackages_13.stdenv.mkDerivation (args // { 59 58 deps = stdenvNoCC.mkDerivation (lib.recursiveUpdate (getAttrsOrNull fetchAttrs args) { 60 - name = "${self.name}-deps-flutter-v${flutter.unwrapped.version}-${targetPlatform.system}.tar.gz"; 59 + name = "${self.name}-deps-flutter-v${flutter.unwrapped.version}-${stdenvNoCC.targetPlatform.system}.tar.gz"; 61 60 62 61 nativeBuildInputs = flutterDeps ++ [ 63 62 nukeReferences
+3 -3
pkgs/build-support/rust/build-rust-crate/test/brotli-crates.nix
··· 1 - { lib, buildPlatform, buildRustCrate, fetchgit }: 2 - let kernel = buildPlatform.parsed.kernel.name; 3 - abi = buildPlatform.parsed.abi.name; 1 + { lib, stdenv, buildRustCrate, fetchgit }: 2 + let kernel = stdenv.buildPlatform.parsed.kernel.name; 3 + abi = stdenv.buildPlatform.parsed.abi.name; 4 4 include = includedFiles: src: builtins.filterSource (path: type: 5 5 lib.lists.any (f: 6 6 let p = toString (src + ("/" + f)); in
+1 -1
pkgs/development/haskell-modules/configuration-common.nix
··· 452 452 # 453 453 # # Depends on itself for testing 454 454 # doctest-discover = addBuildTool super.doctest-discover 455 - # (if pkgs.buildPlatform != pkgs.hostPlatform 455 + # (if pkgs.stdenv.buildPlatform != pkgs.stdenv.hostPlatform 456 456 # then self.buildHaskellPackages.doctest-discover 457 457 # else dontCheck super.doctest-discover); 458 458 doctest-discover = dontCheck super.doctest-discover;
+1 -2
pkgs/development/libraries/science/math/tensorflow-lite/default.nix
··· 6 6 , fetchpatch 7 7 , fetchurl 8 8 , flatbuffers 9 - , hostPlatform 10 9 , lib 11 10 , zlib 12 11 }: ··· 160 159 mkdir "$out" 161 160 162 161 # copy the static lib and binaries into the output dir 163 - cp -r ./tensorflow/lite/tools/make/gen/linux_${hostPlatform.uname.processor}/{bin,lib} "$out" 162 + cp -r ./tensorflow/lite/tools/make/gen/linux_${stdenv.hostPlatform.uname.processor}/{bin,lib} "$out" 164 163 165 164 find ./tensorflow/lite -type f -name '*.h' | while read f; do 166 165 path="$out/include/''${f/.\//}"
+2 -2
pkgs/development/python-modules/rfcat/default.nix
··· 1 1 { lib 2 + , stdenv 2 3 , buildPythonPackage 3 4 , fetchFromGitHub 4 5 , future ··· 6 7 , numpy 7 8 , pyserial 8 9 , pyusb 9 - , hostPlatform 10 10 , pytestCheckHook 11 11 , pythonOlder 12 12 }: ··· 33 33 pyusb 34 34 ]; 35 35 36 - postInstall = lib.optionalString hostPlatform.isLinux '' 36 + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' 37 37 mkdir -p $out/etc/udev/rules.d 38 38 cp etc/udev/rules.d/20-rfcat.rules $out/etc/udev/rules.d 39 39 '';
+2 -2
pkgs/games/BeatSaberModManager/default.nix
··· 1 1 { 2 2 lib, 3 3 dotnet-sdk, 4 - targetPlatform, 4 + stdenv, 5 5 substituteAll, 6 6 7 7 buildDotnetModule, ··· 34 34 patches = [ 35 35 (substituteAll { 36 36 src = ./add-runtime-identifier.patch; 37 - runtimeIdentifier = dotnetCorePackages.systemToDotnetRid targetPlatform.system; 37 + runtimeIdentifier = dotnetCorePackages.systemToDotnetRid stdenv.targetPlatform.system; 38 38 }) 39 39 ]; 40 40
+1 -2
pkgs/misc/dxvk/default.nix
··· 1 1 { lib 2 2 , pkgs 3 - , hostPlatform 4 3 , stdenvNoCC 5 4 , fetchFromGitHub 6 5 , pkgsCross ··· 8 7 9 8 stdenvNoCC.mkDerivation (finalAttrs: 10 9 let 11 - inherit (hostPlatform.uname) system; 10 + inherit (stdenvNoCC.hostPlatform.uname) system; 12 11 # DXVK needs to be a separate derivation because it’s actually a set of DLLs for Windows that 13 12 # needs to be built with a cross-compiler. 14 13 dxvk32 = pkgsCross.mingw32.callPackage ./dxvk.nix {
+3 -3
pkgs/os-specific/darwin/xcode/default.nix
··· 1 - { buildPlatform, requireFile, targetPlatform, lib }: 1 + { stdenv, requireFile, lib }: 2 2 3 3 let requireXcode = version: sha256: 4 4 let 5 5 xip = "Xcode_" + version + ".xip"; 6 6 # TODO(alexfmpe): Find out how to validate the .xip signature in Linux 7 - unxip = if buildPlatform.isDarwin 7 + unxip = if stdenv.buildPlatform.isDarwin 8 8 then '' 9 9 open -W ${xip} 10 10 rm -rf ${xip} ··· 66 66 xcode_12_1 = requireXcode "12.1" "1widy74dk43wx8iqgd7arzf6q4kzdmaz8pfwymzs8chnq9dqr3wp"; 67 67 xcode_12_2 = requireXcode "12.2" "17i0wf4pwrxwfgjw7rpw9mcd59nkmys1k5h2rqsw81snzyxy9j0v"; 68 68 xcode_12_3 = requireXcode "12.3" "0kwf1y4llysf1p0nsbqyzccn7d77my0ldagr5fi3by4k0xy3d189"; 69 - xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if (targetPlatform ? xcodeVer) then targetPlatform.xcodeVer else "12.3")}"; 69 + xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if (stdenv.targetPlatform ? xcodeVer) then stdenv.targetPlatform.xcodeVer else "12.3")}"; 70 70 }) 71 71
+5 -5
pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
··· 1 - { targetPlatform 1 + { stdenv 2 2 , clang-unwrapped 3 3 , binutils-unwrapped 4 4 , runCommand ··· 12 12 13 13 let 14 14 15 - minSdkVersion = targetPlatform.minSdkVersion or "9.0"; 15 + minSdkVersion = stdenv.targetPlatform.minSdkVersion or "9.0"; 16 16 17 17 in 18 18 ··· 22 22 type = "derivation"; 23 23 outPath = xcode + "/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${version}.sdk"; 24 24 25 - platform = targetPlatform.xcodePlatform; 26 - version = targetPlatform.sdkVer; 25 + platform = stdenv.targetPlatform.xcodePlatform; 26 + version = stdenv.targetPlatform.sdkVer; 27 27 }; 28 28 29 29 binutils = wrapBintoolsWith { ··· 39 39 extraBuildCommands = '' 40 40 tr '\n' ' ' < $out/nix-support/cc-cflags > cc-cflags.tmp 41 41 mv cc-cflags.tmp $out/nix-support/cc-cflags 42 - echo "-target ${targetPlatform.config}" >> $out/nix-support/cc-cflags 42 + echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags 43 43 echo "-isystem ${sdk}/usr/include${lib.optionalString (lib.versionAtLeast "10" sdk.version) " -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++"}" >> $out/nix-support/cc-cflags 44 44 ${lib.optionalString (lib.versionAtLeast sdk.version "14") "echo -isystem ${xcode}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 >> $out/nix-support/cc-cflags"} 45 45 '';
+2 -2
pkgs/test/cross/default.nix
··· 8 8 ) lib.systems.examples; 9 9 10 10 getExecutable = pkgs: pkgFun: exec: 11 - "${pkgFun pkgs}${exec}${pkgs.hostPlatform.extensions.executable}"; 11 + "${pkgFun pkgs}${exec}${pkgs.stdenv.hostPlatform.extensions.executable}"; 12 12 13 13 compareTest = { emulator, pkgFun, hostPkgs, crossPkgs, exec, args ? [] }: let 14 14 pkgName = (pkgFun hostPkgs).name; ··· 55 55 56 56 mapMultiPlatformTest = crossSystemFun: test: lib.mapAttrs (name: system: test rec { 57 57 crossPkgs = import pkgs.path { 58 - localSystem = { inherit (pkgs.hostPlatform) config; }; 58 + localSystem = { inherit (pkgs.stdenv.hostPlatform) config; }; 59 59 crossSystem = crossSystemFun system; 60 60 }; 61 61
+2 -2
pkgs/tools/compression/zfp/default.nix
··· 1 - { cmake, cudatoolkit, fetchFromGitHub, gfortran, lib, llvmPackages, python3Packages, stdenv, targetPlatform 1 + { cmake, cudatoolkit, fetchFromGitHub, gfortran, lib, llvmPackages, python3Packages, stdenv 2 2 , enableCfp ? true 3 3 , enableCuda ? false 4 - , enableFortran ? builtins.elem targetPlatform.system gfortran.meta.platforms 4 + , enableFortran ? builtins.elem stdenv.targetPlatform.system gfortran.meta.platforms 5 5 , enableOpenMP ? true 6 6 , enablePython ? true 7 7 , enableUtilities ? true }: