mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
cuda-modules: use stdenv instead of backendStdenv for *Platform access
This commit is contained in:
parent
843b91a0ee
commit
7a66dcf83f
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
'';
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
|
@ -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,
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user