about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSomeone Serge <sergei.kozlukov@aalto.fi>2023-07-20 17:57:06 +0300
committerSomeone Serge <sergei.kozlukov@aalto.fi>2023-07-20 17:57:31 +0300
commit133993211b39907a09986b338e9394908de223f2 (patch)
treeda35f826085e575f78070ccfeccd9aa3890734c2
parenta17baa5db4f809809e4ae8cae66f2935cd37f2ab (diff)
config.cudaSupport: init option
-rw-r--r--doc/languages-frameworks/cuda.section.md2
-rw-r--r--pkgs/top-level/config.nix6
2 files changed, 7 insertions, 1 deletions
diff --git a/doc/languages-frameworks/cuda.section.md b/doc/languages-frameworks/cuda.section.md
index b571ca257427f..b7f1f19546a78 100644
--- a/doc/languages-frameworks/cuda.section.md
+++ b/doc/languages-frameworks/cuda.section.md
@@ -13,7 +13,7 @@ compatible are available as well. For example, there can be a
 To use one or more CUDA packages in an expression, give the expression a `cudaPackages` parameter, and in case CUDA is optional
 ```nix
 { config
-, cudaSupport ? config.cudaSupport or false
+, cudaSupport ? config.cudaSupport
 , cudaPackages ? { }
 , ...
 }:
diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix
index 42053ce95de71..5e25231d957c7 100644
--- a/pkgs/top-level/config.nix
+++ b/pkgs/top-level/config.nix
@@ -117,6 +117,12 @@ let
       '';
     };
 
+    cudaSupport = mkMassRebuild {
+      type = types.bool;
+      default = false;
+      feature = "build packages with CUDA support by default";
+    };
+
     showDerivationWarnings = mkOption {
       type = types.listOf (types.enum [ "maintainerless" ]);
       default = [];