diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index 3367fa87422b..2a736d3d398e 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { cmakeFlags = # It's important that caffe is passed the major and minor version only because that's what # boost_python expects - [ (if pythonSupport then "-Dpython_version=3${python.pythonVersion}" else "-DBUILD_python=OFF") + [ (if pythonSupport then "-Dpython_version=${python.pythonVersion}" else "-DBUILD_python=OFF") "-DBLAS=open" ] ++ (if cudaSupport then [ "-DCUDA_ARCH_NAME=All" diff --git a/pkgs/applications/science/math/caffe/python.patch b/pkgs/applications/science/math/caffe/python.patch index b1bed6c174b8..dac5071aa08c 100644 --- a/pkgs/applications/science/math/caffe/python.patch +++ b/pkgs/applications/science/math/caffe/python.patch @@ -64,7 +64,7 @@ index 4a5bac47..be026d43 100644 - if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND Boost_PYTHON_FOUND) + find_package(NumPy 1.7.1) + find_package(Boost 1.46 REQUIRED COMPONENTS python@major@@minor@) -+ if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND BOOST_PYTHON@major@@minor@_FOUND) ++ if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND Boost_PYTHON@major@@minor@_FOUND) set(HAVE_PYTHON TRUE) if(BUILD_python_layer) list(APPEND Caffe_DEFINITIONS PRIVATE -DWITH_PYTHON_LAYER)