From 59f51eba29820a1b6294a66c977a49d4a92a55c7 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 16 Oct 2017 04:25:18 +0300 Subject: [PATCH] opencv3: use older cudatoolkit --- pkgs/development/libraries/opencv/3.x.nix | 6 ++++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index 46ee4ea565bb..ecb7bf78b206 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -165,8 +165,10 @@ stdenv.mkDerivation rec { (opencvFlag "OPENEXR" enableEXR) (opencvFlag "CUDA" enableCuda) (opencvFlag "CUBLAS" enableCuda) - ] ++ lib.optionals enableCuda [ "-DCUDA_FAST_MATH=ON" ] - ++ lib.optional buildContrib "-DBUILD_PROTOBUF=off" + ] ++ lib.optionals enableCuda [ + "-DCUDA_FAST_MATH=ON" + "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/gcc" + ] ++ lib.optional buildContrib "-DBUILD_PROTOBUF=off" ++ lib.optionals stdenv.isDarwin ["-DWITH_OPENCL=OFF" "-DWITH_LAPACK=OFF"]; enableParallelBuilding = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ecba5c486ee..a91a3b7c3aea 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10014,6 +10014,7 @@ with pkgs; opencv3 = callPackage ../development/libraries/opencv/3.x.nix { enableCuda = config.cudaSupport or false; + cudatoolkit = cudatoolkit8; inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa QTKit; };