diff options
author | Connor Baker <connor.baker@tweag.io> | 2024-04-03 16:32:02 +0000 |
---|---|---|
committer | Connor Baker <connor.baker@tweag.io> | 2024-04-10 14:14:00 +0000 |
commit | 14635b40927383531ad9b6b5335911fdab7d6ac9 (patch) | |
tree | cb94fd8fce022db2519747fc3570cc8d8f5d07c7 /pkgs/development/cuda-modules/generic-builders | |
parent | 2639fa16b9361aef298b02d753a75881da273b19 (diff) |
cuda-modules: don't use *Platform attributes from pkgs
For more information about *why* this is desirable, see https://github.com/NixOS/nixpkgs/pull/45717 and https://github.com/NixOS/nixpkgs/issues/27069
Diffstat (limited to 'pkgs/development/cuda-modules/generic-builders')
-rw-r--r-- | pkgs/development/cuda-modules/generic-builders/manifest.nix | 5 | ||||
-rw-r--r-- | pkgs/development/cuda-modules/generic-builders/multiplex.nix | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/development/cuda-modules/generic-builders/manifest.nix b/pkgs/development/cuda-modules/generic-builders/manifest.nix index 73c34b0c86ee5..e5831ef99dd0d 100644 --- a/pkgs/development/cuda-modules/generic-builders/manifest.nix +++ b/pkgs/development/cuda-modules/generic-builders/manifest.nix @@ -10,7 +10,6 @@ markForCudatoolkitRootHook, flags, stdenv, - hostPlatform, # Builder-specific arguments # Short package name (e.g., "cuda_cccl") # pname : String @@ -40,6 +39,8 @@ let sourceTypes ; + inherit (backendStdenv) hostPlatform; + # Get the redist architectures for which package provides distributables. # These are used by meta.platforms. supportedRedistArchs = builtins.attrNames featureRelease; @@ -48,7 +49,7 @@ let # It is `"unsupported"` if the redistributable is not supported on the target platform. redistArch = flags.getRedistArch hostPlatform.system; - sourceMatchesHost = flags.getNixSystem redistArch == stdenv.hostPlatform.system; + sourceMatchesHost = flags.getNixSystem redistArch == hostPlatform.system; in backendStdenv.mkDerivation (finalAttrs: { # NOTE: Even though there's no actual buildPhase going on here, the derivations of the diff --git a/pkgs/development/cuda-modules/generic-builders/multiplex.nix b/pkgs/development/cuda-modules/generic-builders/multiplex.nix index 0b523e56b8c43..fd06d19e60f04 100644 --- a/pkgs/development/cuda-modules/generic-builders/multiplex.nix +++ b/pkgs/development/cuda-modules/generic-builders/multiplex.nix @@ -3,7 +3,9 @@ lib, cudaVersion, flags, - hostPlatform, + # 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, # pname :: String @@ -40,6 +42,8 @@ let strings ; + inherit (stdenv) hostPlatform; + evaluatedModules = modules.evalModules { modules = [ ../modules |