cuda-modules: use stdenv instead of backendStdenv for *Platform access

This commit is contained in:
Connor Baker 2024-04-18 15:46:47 +00:00
parent 843b91a0ee
commit 7a66dcf83f
8 changed files with 6 additions and 18 deletions

View File

@ -1,9 +1,4 @@
{
lib,
# NOTE: We would use backendStdenv to get the hostPlatform, but it's not available in the callPackage context
# we're using to call this file.
stdenv,
}:
{ lib, stdenv }:
let
inherit (stdenv) hostPlatform;

View File

@ -1,8 +1,6 @@
{
cudaVersion,
lib,
# NOTE: We would use backendStdenv to get the hostPlatform, but it's not available in the callPackage context
# we're using to call this file.
stdenv,
}:
let

View File

@ -11,6 +11,7 @@
hash,
lib,
pkg-config,
stdenv,
}:
let
inherit (lib) lists strings;
@ -63,7 +64,7 @@ backendStdenv.mkDerivation (finalAttrs: {
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin bin/${backendStdenv.hostPlatform.parsed.cpu.name}/${backendStdenv.hostPlatform.parsed.kernel.name}/release/*
install -Dm755 -t $out/bin bin/${stdenv.hostPlatform.parsed.cpu.name}/${stdenv.hostPlatform.parsed.kernel.name}/release/*
runHook postInstall
'';

View File

@ -17,8 +17,6 @@
flags,
lib,
mkVersionedPackageName,
# NOTE: We would use backendStdenv to get the hostPlatform, but it's not available in the callPackage context
# we're using to call this file.
stdenv,
}:
let

View File

@ -7,8 +7,6 @@
cudaForwardCompat ? (config.cudaForwardCompat or true),
lib,
cudaVersion,
# NOTE: We cannot refer to backendStdenv as flags exists outside the fixed-point;
# otherwise, we would use that to get the hostPlatform.
stdenv,
# gpus :: List Gpu
gpus,

View File

@ -39,7 +39,7 @@ let
sourceTypes
;
inherit (backendStdenv) hostPlatform;
inherit (stdenv) hostPlatform;
# Get the redist architectures for which package provides distributables.
# These are used by meta.platforms.

View File

@ -3,8 +3,6 @@
lib,
cudaVersion,
flags,
# NOTE: We would use backendStdenv to get the hostPlatform, but it's not available in the callPackage context
# we're using to call this file (cudaPackages.callPackage).
stdenv,
# Expected to be passed by the caller
mkVersionedPackageName,

View File

@ -1,5 +1,4 @@
{
backendStdenv,
cudaVersion,
final,
lib,
@ -7,6 +6,7 @@
package,
patchelf,
requireFile,
stdenv,
...
}:
let
@ -17,7 +17,7 @@ let
strings
versions
;
inherit (backendStdenv) hostPlatform;
inherit (stdenv) hostPlatform;
# targetArch :: String
targetArch = attrsets.attrByPath [ hostPlatform.system ] "unsupported" {
x86_64-linux = "x86_64-linux-gnu";