diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index e56c63e01bf0..c0c26d6e453c 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, runCommand +{ config, stdenv, lib, runCommand , fetchFromGitHub , fetchurl , cmake @@ -13,8 +13,8 @@ , Accelerate, CoreGraphics, CoreVideo , lmdbSupport ? true, lmdb , leveldbSupport ? true, leveldb, snappy -, cudaSupport ? stdenv.isLinux, cudatoolkit -, cudnnSupport ? false, cudnn ? null +, cudaSupport ? config.cudaSupport or false, cudatoolkit +, cudnnSupport ? cudaSupport, cudnn ? null , ncclSupport ? false, nccl ? null , pythonSupport ? false, python ? null, numpy ? null }: diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23d20a9682e0..4a87efeded72 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21850,20 +21850,16 @@ in ### SCIENCE / MATH - caffe = callPackage ../applications/science/math/caffe rec { - cudaSupport = config.caffe.cudaSupport or config.cudaSupport or false; - cudnnSupport = cudaSupport; - # Used only for image loading. - opencv3 = opencv3WithoutCuda; + caffe = callPackage ../applications/science/math/caffe ({ + opencv3 = opencv3WithoutCuda; # Used only for image loading. inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo; - }; + } // (config.caffe or {})); caffe2 = callPackage ../development/libraries/science/math/caffe2 (rec { inherit (python36Packages) python future six numpy pydot; protobuf = protobuf3_1; python-protobuf = python36Packages.protobuf.override { inherit protobuf; }; - # Used only for image loading. - opencv3 = opencv3WithoutCuda; + opencv3 = opencv3WithoutCuda; # Used only for image loading. }); cntk = callPackage ../applications/science/math/cntk rec {