about summary refs log tree commit diff
path: root/pkgs/applications/science/math
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r--pkgs/applications/science/math/caffe/default.nix5
-rw-r--r--pkgs/applications/science/math/mxnet/default.nix9
2 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix
index 5c6fe9c573d5..cb28d38bf1d0 100644
--- a/pkgs/applications/science/math/caffe/default.nix
+++ b/pkgs/applications/science/math/caffe/default.nix
@@ -46,9 +46,8 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = lib.optional pythonSupport python.pkgs.protobuf;
 
-  outputs = [ "out" "bin" ];
-  # Don't propagate bin.
-  outputBin = "out";
+  outputs = [ "bin" "out"];
+  propagatedBuildOutputs = []; # otherwise propagates out -> bin cycle
 
   postInstall = ''
     # Internal static library.
diff --git a/pkgs/applications/science/math/mxnet/default.nix b/pkgs/applications/science/math/mxnet/default.nix
index 67183c9dd551..d2f3d0c5f337 100644
--- a/pkgs/applications/science/math/mxnet/default.nix
+++ b/pkgs/applications/science/math/mxnet/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchgit, cmake
 , opencv, gtest, openblas, liblapack
-, cudaSupport ? false, cudatoolkit
+, cudaSupport ? false, cudatoolkit, nvidia_x11
 , cudnnSupport ? false, cudnn
 }:
 
@@ -20,11 +20,12 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
 
   buildInputs = [ opencv gtest openblas liblapack ]
-              ++ lib.optional cudaSupport cudatoolkit
+              ++ lib.optionals cudaSupport [ cudatoolkit nvidia_x11 ]
               ++ lib.optional cudnnSupport cudnn;
 
-  cmakeFlags = lib.optional (!cudaSupport) "-DUSE_CUDA=OFF"
-            ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";
+  cmakeFlags = [
+    (if cudaSupport then "-DCUDA_ARCH_NAME=All" else "-DUSE_CUDA=OFF")
+  ] ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";
 
   installPhase = ''
     install -Dm755 libmxnet.so $out/lib/libmxnet.so