diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix index ab75938760b3..8a95d10203c4 100644 --- a/pkgs/applications/graphics/digikam/default.nix +++ b/pkgs/applications/graphics/digikam/default.nix @@ -54,7 +54,7 @@ , breeze-icons , oxygen -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudaPackages ? {} }: diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 81b7a54a754d..f6f5edc84ef8 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -5,7 +5,7 @@ , openvdb, libXxf86vm, tbb, alembic , zlib, zstd, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath , jackaudioSupport ? false, libjack2 -, cudaSupport ? config.cudaSupport or false, cudaPackages ? {} +, cudaSupport ? config.cudaSupport, cudaPackages ? { } , hipSupport ? false, hip # comes with a significantly larger closure size , colladaSupport ? true, opencollada , spaceNavSupport ? stdenv.isLinux, libspnav diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index 4cd2511786b3..5af927294d6c 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -13,7 +13,7 @@ , Accelerate, CoreGraphics, CoreVideo , lmdbSupport ? true, lmdb , leveldbSupport ? true, leveldb, snappy -, cudaSupport ? config.cudaSupport or false, cudaPackages ? {} +, cudaSupport ? config.cudaSupport, cudaPackages ? { } , cudnnSupport ? cudaSupport , ncclSupport ? false , pythonSupport ? false, python ? null, numpy ? null diff --git a/pkgs/applications/science/math/cntk/default.nix b/pkgs/applications/science/math/cntk/default.nix index 248504501613..91d208a56ede 100644 --- a/pkgs/applications/science/math/cntk/default.nix +++ b/pkgs/applications/science/math/cntk/default.nix @@ -3,7 +3,7 @@ , openblas, blas, lapack, opencv3, libzip, boost, protobuf, mpi , onebitSGDSupport ? false , config -, cudaSupport ? config.cudaSupport or false, cudaPackages ? {}, addOpenGLRunpath, cudatoolkit, nvidia_x11 +, cudaSupport ? config.cudaSupport, cudaPackages ? { }, addOpenGLRunpath, cudatoolkit, nvidia_x11 , cudnnSupport ? cudaSupport }: diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix index c0f370d88457..289c9b7b6580 100644 --- a/pkgs/applications/science/math/mathematica/default.nix +++ b/pkgs/applications/science/math/mathematica/default.nix @@ -2,7 +2,7 @@ , config , lib , cudaPackages -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , lang ? "en" , webdoc ? false , version ? null diff --git a/pkgs/applications/science/math/mxnet/default.nix b/pkgs/applications/science/math/mxnet/default.nix index 240a1759397f..1e7af371c509 100644 --- a/pkgs/applications/science/math/mxnet/default.nix +++ b/pkgs/applications/science/math/mxnet/default.nix @@ -1,6 +1,6 @@ { config, stdenv, lib, fetchurl, fetchpatch, bash, cmake , opencv3, gtest, blas, gomp, llvmPackages, perl -, cudaSupport ? config.cudaSupport or false, cudaPackages ? {}, nvidia_x11 +, cudaSupport ? config.cudaSupport, cudaPackages ? { }, nvidia_x11 , cudnnSupport ? cudaSupport }: diff --git a/pkgs/applications/science/misc/colmap/default.nix b/pkgs/applications/science/misc/colmap/default.nix index b32aa86f9f2f..a029f5440b25 100644 --- a/pkgs/applications/science/misc/colmap/default.nix +++ b/pkgs/applications/science/misc/colmap/default.nix @@ -1,7 +1,7 @@ { mkDerivation, lib, fetchFromGitHub, cmake, boost179, ceres-solver, eigen, freeimage, glog, libGLU, glew, qtbase, config, - cudaSupport ? config.cudaSupport or false, cudaPackages }: + cudaSupport ? config.cudaSupport, cudaPackages }: assert cudaSupport -> cudaPackages != { }; diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix index fe7a0030175b..c1e4aa350295 100644 --- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix +++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix @@ -2,7 +2,7 @@ , singlePrec ? true , config , enableMpi ? false -, enableCuda ? config.cudaSupport or false +, enableCuda ? config.cudaSupport , cpuAcceleration ? null }: diff --git a/pkgs/development/libraries/arrayfire/default.nix b/pkgs/development/libraries/arrayfire/default.nix index edc3c3bad57b..2c1caf0bbb2b 100644 --- a/pkgs/development/libraries/arrayfire/default.nix +++ b/pkgs/development/libraries/arrayfire/default.nix @@ -20,7 +20,7 @@ , doxygen , buildDocs ? false , config -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudatoolkit , darwin }: diff --git a/pkgs/development/libraries/elpa/default.nix b/pkgs/development/libraries/elpa/default.nix index 73ebf218ee38..ec108adc61eb 100644 --- a/pkgs/development/libraries/elpa/default.nix +++ b/pkgs/development/libraries/elpa/default.nix @@ -8,7 +8,7 @@ # Enable NIVIA GPU support # Note, that this needs to be built on a system with a GPU # present for the tests to succeed. -, enableCuda ? config.cudaSupport or false +, enableCuda ? config.cudaSupport # type of GPU architecture , nvidiaArch ? "sm_60" , cudatoolkit diff --git a/pkgs/development/libraries/frei0r/default.nix b/pkgs/development/libraries/frei0r/default.nix index dbf5b9c2373e..0215b82a828c 100644 --- a/pkgs/development/libraries/frei0r/default.nix +++ b/pkgs/development/libraries/frei0r/default.nix @@ -7,7 +7,7 @@ , opencv , pcre , pkg-config -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudaPackages }: diff --git a/pkgs/development/libraries/hwloc/default.nix b/pkgs/development/libraries/hwloc/default.nix index 8159f31bbbb5..b0c632b69c03 100644 --- a/pkgs/development/libraries/hwloc/default.nix +++ b/pkgs/development/libraries/hwloc/default.nix @@ -3,7 +3,7 @@ , libX11 , cairo , config -, enableCuda ? config.cudaSupport or false +, enableCuda ? config.cudaSupport , cudaPackages }: diff --git a/pkgs/development/libraries/librealsense/default.nix b/pkgs/development/libraries/librealsense/default.nix index cfe7fb89bd56..aec9cfaaf91a 100644 --- a/pkgs/development/libraries/librealsense/default.nix +++ b/pkgs/development/libraries/librealsense/default.nix @@ -13,7 +13,7 @@ , glfw , libGLU , curl -, cudaSupport ? config.cudaSupport or false, cudaPackages ? {} +, cudaSupport ? config.cudaSupport, cudaPackages ? { } , enablePython ? false, pythonPackages ? null , enableGUI ? false, }: diff --git a/pkgs/development/libraries/lightgbm/default.nix b/pkgs/development/libraries/lightgbm/default.nix index 7ac716b326dd..25cb21a314ce 100644 --- a/pkgs/development/libraries/lightgbm/default.nix +++ b/pkgs/development/libraries/lightgbm/default.nix @@ -1,5 +1,5 @@ { config, stdenv, lib, fetchFromGitHub, cmake, gtest, doCheck ? true -, cudaSupport ? config.cudaSupport or false, openclSupport ? false, mpiSupport ? false, javaWrapper ? false, hdfsSupport ? false +, cudaSupport ? config.cudaSupport, openclSupport ? false, mpiSupport ? false, javaWrapper ? false, hdfsSupport ? false , rLibrary ? false, cudaPackages, opencl-headers, ocl-icd, boost, llvmPackages, openmpi, openjdk, swig, hadoop, R, rPackages }: assert doCheck -> mpiSupport != true; diff --git a/pkgs/development/libraries/mlt/default.nix b/pkgs/development/libraries/mlt/default.nix index 1cd14cbcb565..19b03a24a45a 100644 --- a/pkgs/development/libraries/mlt/default.nix +++ b/pkgs/development/libraries/mlt/default.nix @@ -21,7 +21,7 @@ , sox , vid-stab , darwin -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudaPackages ? { } , enableJackrack ? stdenv.isLinux , ladspa-sdk diff --git a/pkgs/development/libraries/nvidia-thrust/default.nix b/pkgs/development/libraries/nvidia-thrust/default.nix index 679b2c61c45a..f68b57f193b7 100644 --- a/pkgs/development/libraries/nvidia-thrust/default.nix +++ b/pkgs/development/libraries/nvidia-thrust/default.nix @@ -8,7 +8,7 @@ , symlinkJoin , tbb , hostSystem ? "CPP" -, deviceSystem ? if config.cudaSupport or false then "CUDA" else "OMP" +, deviceSystem ? if config.cudaSupport then "CUDA" else "OMP" }: # Policy for device_vector diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index 40614f489b51..0188e5e1ae96 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -14,7 +14,7 @@ , enableOpenblas ? true, openblas, blas, lapack , enableContrib ? true -, enableCuda ? (config.cudaSupport or false) && +, enableCuda ? config.cudaSupport && stdenv.hostPlatform.isx86_64 , cudaPackages ? { } , enableUnfree ? false diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 3f120e2558f3..c82f0a0065b6 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -37,7 +37,7 @@ , blas , enableContrib ? true -, enableCuda ? (config.cudaSupport or false) && stdenv.hostPlatform.isx86_64 +, enableCuda ? config.cudaSupport && stdenv.hostPlatform.isx86_64 , enableCublas ? enableCuda , enableCudnn ? false # NOTE: CUDNN has a large impact on closure size so we disable it by default , enableCufft ? enableCuda diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index 1d2b0e759aa7..937669fc5855 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -3,7 +3,7 @@ , libpsm2, libfabric, pmix, ucx , config # Enable CUDA support -, cudaSupport ? config.cudaSupport or false, cudatoolkit +, cudaSupport ? config.cudaSupport, cudatoolkit # Enable the Sun Grid Engine bindings , enableSGE ? false diff --git a/pkgs/development/libraries/opensubdiv/default.nix b/pkgs/development/libraries/opensubdiv/default.nix index 9511f4f56f7e..4cd398e6394a 100644 --- a/pkgs/development/libraries/opensubdiv/default.nix +++ b/pkgs/development/libraries/opensubdiv/default.nix @@ -1,6 +1,6 @@ { config, lib, stdenv, fetchFromGitHub, cmake, pkg-config, xorg, libGLU , libGL, glew, ocl-icd, python3 -, cudaSupport ? config.cudaSupport or false, cudatoolkit +, cudaSupport ? config.cudaSupport, cudatoolkit # For visibility mostly. The whole approach to cuda architectures and capabilities # will be reworked soon. , cudaArch ? "compute_37" diff --git a/pkgs/development/libraries/science/chemistry/openmm/default.nix b/pkgs/development/libraries/science/chemistry/openmm/default.nix index 8b25554c4ab1..a7c388339de0 100644 --- a/pkgs/development/libraries/science/chemistry/openmm/default.nix +++ b/pkgs/development/libraries/science/chemistry/openmm/default.nix @@ -12,7 +12,7 @@ , opencl-headers , ocl-icd , config -, enableCuda ? config.cudaSupport or false +, enableCuda ? config.cudaSupport , cudaPackages , addOpenGLRunpath }: diff --git a/pkgs/development/libraries/science/math/faiss/default.nix b/pkgs/development/libraries/science/math/faiss/default.nix index d67f31375e7d..21e6cbf858cd 100644 --- a/pkgs/development/libraries/science/math/faiss/default.nix +++ b/pkgs/development/libraries/science/math/faiss/default.nix @@ -5,7 +5,7 @@ , stdenv , cmake , cudaPackages ? { } -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , nvidia-thrust , useThrustSourceBuild ? true , pythonSupport ? true diff --git a/pkgs/development/libraries/science/math/suitesparse/4.4.nix b/pkgs/development/libraries/science/math/suitesparse/4.4.nix index 0466027e03f3..cbc24b154656 100644 --- a/pkgs/development/libraries/science/math/suitesparse/4.4.nix +++ b/pkgs/development/libraries/science/math/suitesparse/4.4.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, gfortran, blas, lapack , config -, enableCuda ? config.cudaSupport or false, cudatoolkit +, enableCuda ? config.cudaSupport, cudatoolkit }: let diff --git a/pkgs/development/libraries/science/math/suitesparse/default.nix b/pkgs/development/libraries/science/math/suitesparse/default.nix index 42413e66c714..67dfef186e7d 100644 --- a/pkgs/development/libraries/science/math/suitesparse/default.nix +++ b/pkgs/development/libraries/science/math/suitesparse/default.nix @@ -7,7 +7,7 @@ , gmp , mpfr , config -, enableCuda ? config.cudaSupport or false +, enableCuda ? config.cudaSupport , cudatoolkit }: diff --git a/pkgs/development/libraries/ucc/default.nix b/pkgs/development/libraries/ucc/default.nix index 1c1804e9004c..e26e6e603f8e 100644 --- a/pkgs/development/libraries/ucc/default.nix +++ b/pkgs/development/libraries/ucc/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub, libtool, automake, autoconf, ucx , config -, enableCuda ? config.cudaSupport or false +, enableCuda ? config.cudaSupport , cudatoolkit , enableAvx ? stdenv.hostPlatform.avxSupport , enableSse41 ? stdenv.hostPlatform.sse4_1Support diff --git a/pkgs/development/libraries/ucx/default.nix b/pkgs/development/libraries/ucx/default.nix index cc9cea442d31..4ded9c2860aa 100644 --- a/pkgs/development/libraries/ucx/default.nix +++ b/pkgs/development/libraries/ucx/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, doxygen, numactl , rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config , config -, enableCuda ? config.cudaSupport or false +, enableCuda ? config.cudaSupport , cudatoolkit , enableRocm ? false , rocm-core, rocm-runtime, rocm-device-libs, hip diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix index 0a404f616b92..31d064c2af6d 100644 --- a/pkgs/development/libraries/xgboost/default.nix +++ b/pkgs/development/libraries/xgboost/default.nix @@ -5,7 +5,7 @@ , cmake , gtest , doCheck ? true -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , ncclSupport ? false , rLibrary ? false , cudaPackages diff --git a/pkgs/development/python-modules/chainer/default.nix b/pkgs/development/python-modules/chainer/default.nix index c6793137ba24..1f5be76e2d21 100644 --- a/pkgs/development/python-modules/chainer/default.nix +++ b/pkgs/development/python-modules/chainer/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , config -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cupy , fetchFromGitHub , filelock diff --git a/pkgs/development/python-modules/jaxlib/bin.nix b/pkgs/development/python-modules/jaxlib/bin.nix index c7e84e4c11a2..b3d3138ab443 100644 --- a/pkgs/development/python-modules/jaxlib/bin.nix +++ b/pkgs/development/python-modules/jaxlib/bin.nix @@ -27,7 +27,7 @@ , scipy , stdenv # Options: -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudaPackages ? {} }: diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix index 1e5b7bb6f785..bf93bf1a5a26 100644 --- a/pkgs/development/python-modules/jaxlib/default.nix +++ b/pkgs/development/python-modules/jaxlib/default.nix @@ -42,7 +42,7 @@ , config # CUDA flags: -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudaPackages ? {} # MKL: diff --git a/pkgs/development/python-modules/libgpuarray/default.nix b/pkgs/development/python-modules/libgpuarray/default.nix index 6e5bb05913a2..699bbabdfc76 100644 --- a/pkgs/development/python-modules/libgpuarray/default.nix +++ b/pkgs/development/python-modules/libgpuarray/default.nix @@ -10,7 +10,7 @@ , nose , mako , config -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudaPackages ? { } , openclSupport ? true, ocl-icd, clblas }: diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index 9b34d4e55ed1..d503307ce67a 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -21,7 +21,7 @@ , cudaPackages ? {} # CUDA flags: -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport }: let diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index c9047614b3cd..eb40824c8caa 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -22,7 +22,7 @@ , tensorflow-estimator-bin , tensorboard , config -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudaPackages ? {} , zlib , python diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index fabe1fe7cd2a..d95678f7fc6b 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -18,7 +18,7 @@ # it would also make the default tensorflow package unfree. See # https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0 , config -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudaPackages ? { } , cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities , mklSupport ? false, mkl diff --git a/pkgs/development/python-modules/theano/default.nix b/pkgs/development/python-modules/theano/default.nix index 3a1af4a3517b..428bf4310d6b 100644 --- a/pkgs/development/python-modules/theano/default.nix +++ b/pkgs/development/python-modules/theano/default.nix @@ -12,7 +12,7 @@ , six , libgpuarray , config -, cudaSupport ? config.cudaSupport or false, cudaPackages ? {} +, cudaSupport ? config.cudaSupport, cudaPackages ? { } , cudnnSupport ? cudaSupport }: diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index 98116052649a..912628bf9497 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, buildPythonPackage, python, - config, cudaSupport ? config.cudaSupport or false, cudaPackages, magma, + config, cudaSupport ? config.cudaSupport, cudaPackages, magma, useSystemNccl ? true, MPISupport ? false, mpi, buildDocs ? false, diff --git a/pkgs/games/katago/default.nix b/pkgs/games/katago/default.nix index 3d0b5a141c3c..0ca0deb518ff 100644 --- a/pkgs/games/katago/default.nix +++ b/pkgs/games/katago/default.nix @@ -15,7 +15,7 @@ , openssl , writeShellScriptBin , enableAVX2 ? stdenv.hostPlatform.avx2Support -, backend ? if (config.cudaSupport or false) then "cuda" else "opencl" +, backend ? if config.cudaSupport then "cuda" else "opencl" , enableBigBoards ? false , enableContrib ? false , enableTcmalloc ? true diff --git a/pkgs/servers/sunshine/default.nix b/pkgs/servers/sunshine/default.nix index e5a619de395f..bf3f4fa30058 100644 --- a/pkgs/servers/sunshine/default.nix +++ b/pkgs/servers/sunshine/default.nix @@ -31,7 +31,7 @@ , vulkan-loader , libappindicator , config -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , cudaPackages ? {} }: let diff --git a/pkgs/tools/compression/zfp/default.nix b/pkgs/tools/compression/zfp/default.nix index 487cd02eb59c..d63140b14760 100644 --- a/pkgs/tools/compression/zfp/default.nix +++ b/pkgs/tools/compression/zfp/default.nix @@ -1,7 +1,7 @@ { cmake, cudatoolkit, fetchFromGitHub, gfortran, lib, llvmPackages, python3Packages, stdenv , config , enableCfp ? true -, enableCuda ? config.cudaSupport or false +, enableCuda ? config.cudaSupport , enableFortran ? builtins.elem stdenv.targetPlatform.system gfortran.meta.platforms , enableOpenMP ? true , enablePython ? true diff --git a/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix b/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix index b0d9249197a8..56fe4e122e53 100644 --- a/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix +++ b/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix @@ -1,6 +1,6 @@ { cmake, fetchFromGitHub, makeWrapper, opencv3, lib, stdenv, ocl-icd, opencl-headers, OpenCL , config -, cudaSupport ? config.cudaSupport or false, cudatoolkit ? null +, cudaSupport ? config.cudaSupport, cudatoolkit ? null }: stdenv.mkDerivation rec { diff --git a/pkgs/tools/security/hashcat/default.nix b/pkgs/tools/security/hashcat/default.nix index dc7676ca764d..0fec2a9ec992 100644 --- a/pkgs/tools/security/hashcat/default.nix +++ b/pkgs/tools/security/hashcat/default.nix @@ -2,7 +2,7 @@ , addOpenGLRunpath , config , cudaPackages ? {} -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , fetchurl , makeWrapper , opencl-headers diff --git a/pkgs/tools/security/truecrack/default.nix b/pkgs/tools/security/truecrack/default.nix index aaf1b2580de6..c58ce4ae57b1 100644 --- a/pkgs/tools/security/truecrack/default.nix +++ b/pkgs/tools/security/truecrack/default.nix @@ -1,6 +1,6 @@ { lib, gccStdenv, fetchFromGitLab, cudatoolkit , config -, cudaSupport ? config.cudaSupport or false +, cudaSupport ? config.cudaSupport , pkg-config }: gccStdenv.mkDerivation rec { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 03fcb205dbff..ae86dc0a28b5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4162,7 +4162,7 @@ with pkgs; libtensorflow = python3.pkgs.tensorflow.libtensorflow; libtorch-bin = callPackage ../development/libraries/science/math/libtorch/bin.nix { - cudaSupport = config.cudaSupport or false; + inherit (config) cudaSupport; }; tensorflow-lite = callPackage ../development/libraries/science/math/tensorflow-lite { }; @@ -10825,7 +10825,7 @@ with pkgs; nvidia-thrust-intel = callPackage ../development/libraries/nvidia-thrust { hostSystem = "TBB"; - deviceSystem = if config.cudaSupport or false then "CUDA" else "TBB"; + deviceSystem = if config.cudaSupport then "CUDA" else "TBB"; }; nvidia-thrust-cuda = callPackage ../development/libraries/nvidia-thrust { @@ -15070,7 +15070,7 @@ with pkgs; colm = callPackage ../development/compilers/colm { }; - colmap = libsForQt5.callPackage ../applications/science/misc/colmap { cudaSupport = config.cudaSupport or false; }; + colmap = libsForQt5.callPackage ../applications/science/misc/colmap { inherit (config) cudaSupport; }; colmapWithCuda = colmap.override { cudaSupport = true; }; chickenPackages_4 = callPackage ../development/compilers/chicken/4 { }; @@ -39195,7 +39195,7 @@ with pkgs; ### SCIENCE / MATH caffe = callPackage ../applications/science/math/caffe ({ - cudaSupport = config.cudaSupport or false; + inherit (config) cudaSupport; cudaPackages = cudaPackages_10_1; opencv3 = opencv3WithoutCuda; # Used only for image loading. blas = openblas; @@ -39210,7 +39210,7 @@ with pkgs; stdenv = gcc7Stdenv; inherit (linuxPackages) nvidia_x11; opencv3 = opencv3WithoutCuda; # Used only for image loading. - cudaSupport = config.cudaSupport or false; + inherit (config) cudaSupport; }; dap = callPackage ../applications/science/math/dap { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 52c5deef152c..4af19c093655 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1816,7 +1816,7 @@ self: super: with self; { chai = callPackage ../development/python-modules/chai { }; chainer = callPackage ../development/python-modules/chainer { - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; }; chainmap = callPackage ../development/python-modules/chainmap { }; @@ -5256,13 +5256,13 @@ self: super: with self; { jax-jumpy = callPackage ../development/python-modules/jax-jumpy { }; jaxlib-bin = callPackage ../development/python-modules/jaxlib/bin.nix { - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; }; jaxlib-build = callPackage ../development/python-modules/jaxlib rec { inherit (pkgs.darwin) cctools; # Some platforms don't have `cudaSupport` defined, hence the need for 'or false'. - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; IOKit = pkgs.darwin.apple_sdk_11_0.IOKit; protobuf = pkgs.protobuf3_20; # jaxlib-build 0.3.15 won't build with protobuf 3.21 }; @@ -5803,7 +5803,7 @@ self: super: with self; { libgpuarray = callPackage ../development/python-modules/libgpuarray { clblas = pkgs.clblas.override { inherit (self) boost; }; - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; }; libiio = (toPythonModule (pkgs.libiio.override { inherit python; })).python; @@ -7105,7 +7105,7 @@ self: super: with self; { num2words = callPackage ../development/python-modules/num2words { }; numba = callPackage ../development/python-modules/numba { - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; }; numbaWithCuda = self.numba.override { @@ -7273,7 +7273,7 @@ self: super: with self; { openai-triton-bin = callPackage ../development/python-modules/openai-triton/bin.nix { }; openai-whisper = callPackage ../development/python-modules/openai-whisper { - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; }; openant = callPackage ../development/python-modules/openant { }; @@ -12304,12 +12304,12 @@ self: super: with self; { tensorboardx = callPackage ../development/python-modules/tensorboardx { }; tensorflow-bin = callPackage ../development/python-modules/tensorflow/bin.nix { - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; }; tensorflow-build = callPackage ../development/python-modules/tensorflow { inherit (pkgs.darwin) cctools; - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; inherit (self.tensorflow-bin) cudaPackages; inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security; flatbuffers-core = pkgs.flatbuffers; @@ -12428,7 +12428,7 @@ self: super: with self; { theano-pymc = callPackage ../development/python-modules/theano-pymc { }; theano = callPackage ../development/python-modules/theano rec { - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; cudnnSupport = cudaSupport; }; @@ -12595,9 +12595,9 @@ self: super: with self; { toposort = callPackage ../development/python-modules/toposort { }; torch = callPackage ../development/python-modules/torch { - cudaSupport = pkgs.config.cudaSupport or false; + inherit (pkgs.config) cudaSupport; magma = - if pkgs.config.cudaSupport or false + if pkgs.config.cudaSupport then pkgs.magma-cuda-static else pkgs.magma; inherit (pkgs.darwin.apple_sdk.frameworks) Accelerate CoreServices;