From 303a3f972eabd1eda0b3fbd4051d31d258402ad3 Mon Sep 17 00:00:00 2001 From: Tyson Whitehead Date: Thu, 2 Aug 2018 15:20:24 -0400 Subject: [PATCH] Theano: get theano to use a captured build environment --- .../python-modules/Theano/default.nix | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/Theano/default.nix b/pkgs/development/python-modules/Theano/default.nix index 4341302f33a..793488f0b13 100644 --- a/pkgs/development/python-modules/Theano/default.nix +++ b/pkgs/development/python-modules/Theano/default.nix @@ -1,8 +1,8 @@ { stdenv +, runCommandCC , lib , fetchPypi , gcc -, writeScriptBin , buildPythonPackage , isPyPy , pythonOlder @@ -24,17 +24,22 @@ assert cudaSupport -> nvidia_x11 != 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 cudaSupport [ "-I ${libgpuarray}/include" "-L ${libgpuarray}/lib" ]; + wrapped = command: buildTop: buildInputs: + runCommandCC "${command}-wrapped" { inherit buildInputs; } '' + type -P '${command}' || { echo '${command}: not found'; exit 1; } + cat > "$out" <