diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-11-13 06:47:08 -0800 |
---|---|---|
committer | Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> | 2023-11-17 08:07:34 +0000 |
commit | c7e0f6b9050553dfa8dff259a0536326ac43b0ff (patch) | |
tree | 6862049af64b6ccf9911f5cb54f1651aaf07a182 /pkgs/development/python-modules/jaxlib | |
parent | 6a689e72efffde73cc2c6cfa7e142a8d7f8feafd (diff) |
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.
Diffstat (limited to 'pkgs/development/python-modules/jaxlib')
-rw-r--r-- | pkgs/development/python-modules/jaxlib/default.nix | 10 |
1 files changed, 5 insertions, 5 deletions
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 { |