caffe: opencv3 -> opencv4
This commit is contained in:
parent
2a2ba3dc3f
commit
935338d123
2 changed files with 9 additions and 3 deletions
|
@ -1,12 +1,13 @@
|
||||||
{ config, stdenv, lib
|
{ config, stdenv, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
, fetchpatch
|
||||||
, cmake
|
, cmake
|
||||||
, boost
|
, boost
|
||||||
, gflags
|
, gflags
|
||||||
, glog
|
, glog
|
||||||
, hdf5-cpp
|
, hdf5-cpp
|
||||||
, opencv3
|
, opencv4
|
||||||
, protobuf
|
, protobuf
|
||||||
, doxygen
|
, doxygen
|
||||||
, blas
|
, blas
|
||||||
|
@ -71,7 +72,7 @@ stdenv.mkDerivation rec {
|
||||||
++ ["-DUSE_LEVELDB=${toggle leveldbSupport}"]
|
++ ["-DUSE_LEVELDB=${toggle leveldbSupport}"]
|
||||||
++ ["-DUSE_LMDB=${toggle lmdbSupport}"];
|
++ ["-DUSE_LMDB=${toggle lmdbSupport}"];
|
||||||
|
|
||||||
buildInputs = [ boost gflags glog protobuf hdf5-cpp opencv3 blas ]
|
buildInputs = [ boost gflags glog protobuf hdf5-cpp opencv4 blas ]
|
||||||
++ lib.optional cudaSupport cudatoolkit
|
++ lib.optional cudaSupport cudatoolkit
|
||||||
++ lib.optional cudnnSupport cudnn
|
++ lib.optional cudnnSupport cudnn
|
||||||
++ lib.optional lmdbSupport lmdb
|
++ lib.optional lmdbSupport lmdb
|
||||||
|
@ -96,6 +97,11 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./darwin.patch
|
./darwin.patch
|
||||||
|
(fetchpatch {
|
||||||
|
name = "support-opencv4";
|
||||||
|
url = "https://github.com/BVLC/caffe/pull/6638/commits/0a04cc2ccd37ba36843c18fea2d5cbae6e7dd2b5.patch";
|
||||||
|
hash = "sha256-ZegTvp0tTHlopQv+UzHDigs6XLkP2VfqLCWXl6aKJSI=";
|
||||||
|
})
|
||||||
] ++ lib.optional pythonSupport (substituteAll {
|
] ++ lib.optional pythonSupport (substituteAll {
|
||||||
src = ./python.patch;
|
src = ./python.patch;
|
||||||
inherit (python.sourceVersion) major minor; # Should be changed in case of PyPy
|
inherit (python.sourceVersion) major minor; # Should be changed in case of PyPy
|
||||||
|
|
|
@ -39829,7 +39829,7 @@ with pkgs;
|
||||||
caffe = callPackage ../applications/science/math/caffe ({
|
caffe = callPackage ../applications/science/math/caffe ({
|
||||||
inherit (config) cudaSupport;
|
inherit (config) cudaSupport;
|
||||||
cudaPackages = cudaPackages_10_1;
|
cudaPackages = cudaPackages_10_1;
|
||||||
opencv3 = opencv3WithoutCuda; # Used only for image loading.
|
opencv4 = opencv4WithoutCuda; # Used only for image loading.
|
||||||
blas = openblas;
|
blas = openblas;
|
||||||
inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo;
|
inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo;
|
||||||
} // (config.caffe or {}));
|
} // (config.caffe or {}));
|
||||||
|
|
Loading…
Reference in a new issue