diff options
author | Stefan Matting <stefan.matting@gmail.com> | 2018-05-13 14:23:12 +0200 |
---|---|---|
committer | Stefan Matting <stefan.matting@gmail.com> | 2018-05-13 14:23:12 +0200 |
commit | e0cf582493ad249acbf69267e1a2e35f08e37f47 (patch) | |
tree | c78e949675afa062dec096366a5339a380f58419 /pkgs/development/python-modules/Theano | |
parent | 6d8bf113bd9630c7671065871b5b60a4127ec985 (diff) |
Theano: fix broken compiler; Add nvidia_x11 as dependency when cudaSupport
Diffstat (limited to 'pkgs/development/python-modules/Theano')
-rw-r--r-- | pkgs/development/python-modules/Theano/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/Theano/default.nix b/pkgs/development/python-modules/Theano/default.nix index 03dc825218e25..9eb04782d6f89 100644 --- a/pkgs/development/python-modules/Theano/default.nix +++ b/pkgs/development/python-modules/Theano/default.nix @@ -15,17 +15,24 @@ , libgpuarray , cudaSupport ? false, cudatoolkit , cudnnSupport ? false, cudnn +, nvidia_x11 }: assert cudnnSupport -> cudaSupport; +assert cudaSupport -> nvidia_x11 != null + && cudatoolkit != null + && cudnn != null; + let extraFlags = lib.optionals cudaSupport [ "-I ${cudatoolkit}/include" "-L ${cudatoolkit}/lib" ] - ++ lib.optionals cudnnSupport [ "-I ${cudnn}/include" "-L ${cudnn}/lib" ]; + ++ lib.optionals cudnnSupport [ "-I ${cudnn}/include" "-L ${cudnn}/lib" ] + ++ lib.optionals cudaSupport [ "-I ${libgpuarray}/include" "-L ${libgpuarray}/lib" ]; gcc_ = writeScriptBin "g++" '' #!${stdenv.shell} + export NIX_CC_WRAPPER_${stdenv.cc.infixSalt}_TARGET_HOST=1 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${toString extraFlags}" exec ${gcc}/bin/g++ "$@" ''; |