opencv(4), opencv3: switch to older protobuf

https://hydra.nixos.org/build/231540730
https://hydra.nixos.org/build/231464517
This commit is contained in:
Vladimír Čunát 2023-08-15 07:55:47 +02:00
parent 039c7dfa75
commit bb945f3cea
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@
, fetchFromGitHub
, fetchpatch
, cmake, pkg-config, unzip, zlib, pcre, hdf5
, glog, boost, gflags, protobuf
, glog, boost, gflags, protobuf3_21
, config
, enableJPEG ? true, libjpeg
@ -187,7 +187,7 @@ stdenv.mkDerivation {
buildInputs =
[ zlib pcre hdf5 glog boost gflags ]
++ lib.optional useSystemProtobuf protobuf
++ lib.optional useSystemProtobuf protobuf3_21
++ lib.optional enablePython pythonPackages.python
++ lib.optional enableGtk2 gtk2
++ lib.optional enableGtk3 gtk3

View file

@ -11,7 +11,7 @@
, hdf5
, boost
, gflags
, protobuf
, protobuf3_21
, config
, ocl-icd
, buildPackages
@ -317,7 +317,7 @@ stdenv.mkDerivation {
echo '"(build info elided)"' > modules/core/version_string.inc
'';
buildInputs = [ zlib pcre boost gflags protobuf ]
buildInputs = [ zlib pcre boost gflags protobuf3_21 ]
++ lib.optional enablePython pythonPackages.python
++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) hdf5
++ lib.optional enableGtk2 gtk2
@ -369,7 +369,7 @@ stdenv.mkDerivation {
"-DOPENCV_GENERATE_PKGCONFIG=ON"
"-DWITH_OPENMP=ON"
"-DBUILD_PROTOBUF=OFF"
"-DProtobuf_PROTOC_EXECUTABLE=${lib.getExe buildPackages.protobuf}"
"-DProtobuf_PROTOC_EXECUTABLE=${lib.getExe buildPackages.protobuf3_21}"
"-DPROTOBUF_UPDATE_FILES=ON"
"-DOPENCV_ENABLE_NONFREE=${printEnabled enableUnfree}"
"-DBUILD_TESTS=${printEnabled runAccuracyTests}"