From 133993211b39907a09986b338e9394908de223f2 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Thu, 20 Jul 2023 17:57:06 +0300 Subject: [PATCH] config.cudaSupport: init option --- doc/languages-frameworks/cuda.section.md | 2 +- pkgs/top-level/config.nix | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/languages-frameworks/cuda.section.md b/doc/languages-frameworks/cuda.section.md index b571ca257427..b7f1f19546a7 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 42053ce95de7..5e25231d957c 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 = [];