Merge pull request #208144 from Artturin/opencvupdate1

This commit is contained in:
Artturi 2023-01-03 03:52:35 +02:00 committed by GitHub
commit fc07700aa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View File

@ -323,6 +323,11 @@ stdenv.mkDerivation rec {
postPatch = ''
patchShebangs \
scripts/extract-release-date-from-doap-file.py
# upstream bumps this version check one minor version at a time
# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-bad/ext/opencv/meson.build#L74
substituteInPlace ext/opencv/meson.build \
--replace '< 4.7.0' '< 5.0.0'
'';
# This package has some `_("string literal")` string formats

View File

@ -14,6 +14,7 @@
, config
, ocl-icd
, buildPackages
, qimgv
, enableJPEG ? true
, libjpeg
@ -76,20 +77,20 @@
}:
let
version = "4.6.0";
version = "4.7.0";
src = fetchFromGitHub {
owner = "opencv";
repo = "opencv";
rev = version;
sha256 = "sha256-zPkMc6xEDZU5TlBH3LAzvB17XgocSPeHVMG/U6kfpxg=";
sha256 = "sha256-jUeGsu8+jzzCnIFbVMCW8DcUeGv/t1yCY/WXyW+uGDI=";
};
contribSrc = fetchFromGitHub {
owner = "opencv";
repo = "opencv_contrib";
rev = version;
sha256 = "sha256-hjRqT7V4Sz7t4IEy89F5M+b0x2ObBbqF8GWLKhWFXtE=";
sha256 = "sha256-meya0J3RdOIeMM46e/6IOVwrKn3t/c0rhwP2WQaybkE=";
};
# Contrib must be built in order to enable Tesseract support:
@ -365,7 +366,12 @@ stdenv.mkDerivation {
popd
'';
passthru = lib.optionalAttrs enablePython { pythonPath = [ ]; };
passthru = {
tests = {
inherit qimgv;
inherit (gst_all_1) gst-plugins-bad;
} // lib.optionalAttrs (!enablePython) { pythonEnabled = pythonPackages.opencv4; };
} // lib.optionalAttrs enablePython { pythonPath = [ ]; };
meta = with lib; {
description = "Open Computer Vision Library with more than 500 algorithms";