From 935338d123b4f183820c134edb058e5d022d6e8b Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Thu, 21 Sep 2023 13:27:24 -0400 Subject: caffe: opencv3 -> opencv4 --- pkgs/applications/science/math/caffe/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pkgs/applications/science/math') diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index 527c96f4d64c..42c160393595 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -1,12 +1,13 @@ { config, stdenv, lib , fetchFromGitHub , fetchurl +, fetchpatch , cmake , boost , gflags , glog , hdf5-cpp -, opencv3 +, opencv4 , protobuf , doxygen , blas @@ -71,7 +72,7 @@ stdenv.mkDerivation rec { ++ ["-DUSE_LEVELDB=${toggle leveldbSupport}"] ++ ["-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 cudnnSupport cudnn ++ lib.optional lmdbSupport lmdb @@ -96,6 +97,11 @@ stdenv.mkDerivation rec { patches = [ ./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 { src = ./python.patch; inherit (python.sourceVersion) major minor; # Should be changed in case of PyPy -- cgit 1.4.1