mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 03:10:19 +00:00
config: add enableCudaDriverCompat (#567786)
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
{ buildRedist }:
|
||||
{
|
||||
buildRedist,
|
||||
config,
|
||||
lib,
|
||||
}:
|
||||
buildRedist {
|
||||
redistName = "cuda";
|
||||
pname = "cuda_compat";
|
||||
@@ -16,5 +20,11 @@ buildRedist {
|
||||
meta = {
|
||||
description = "Provides minor version forward compatibility for the CUDA runtime";
|
||||
homepage = "https://docs.nvidia.com/deploy/cuda-compatibility";
|
||||
problems = lib.optionalAttrs config.enableCudaDriverCompat {
|
||||
cuda-compat-disabled = {
|
||||
kind = "broken";
|
||||
message = "cuda_compat must be explicitly enabled using config.enableCudaDriverCompat.";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -348,6 +348,17 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
enableCudaDriverCompat = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable the cuda_compat package which provides user mode backports of newer kernel
|
||||
mode driver functionality.
|
||||
Ony enable this if your host driver is older than the driver provided by the default
|
||||
cudaPackages package set.
|
||||
'';
|
||||
};
|
||||
|
||||
replaceBootstrapFiles = mkMassRebuild {
|
||||
type = types.functionTo (types.attrsOf types.package);
|
||||
default = lib.id;
|
||||
|
||||
Reference in New Issue
Block a user