opencv: fix on cuda 13.2 (#525342)

This commit is contained in:
Gaétan Lepage
2026-05-28 20:48:52 +00:00
committed by GitHub
+16 -3
View File
@@ -3,6 +3,7 @@
stdenv,
fetchurl,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
unzip,
@@ -300,9 +301,21 @@ effectiveStdenv.mkDerivation {
./cmake-don-t-use-OpenCVFindOpenEXR.patch
./0001-cmake-OpenCVUtils.cmake-invalidate-Nix-store-paths-b.patch
]
++ optionals enableCuda [
./cuda_opt_flow.patch
];
++ optionals enableCuda (
[
./cuda_opt_flow.patch
]
++ optionals (cudaPackages.cudaAtLeast "13.2") [
# Backport https://github.com/opencv/opencv_contrib/pull/4097
(fetchpatch {
name = "fix-cuda-13-2-compat";
url = "https://github.com/opencv/opencv_contrib/commit/f2854f4f5e7b67d4e073ea002ae0174d437e2962.patch";
stripLen = 2;
extraPrefix = "opencv_contrib/";
hash = "sha256-nJqPT3gvqTTKFDR9uTFR/7gummlpz1Dw+UQ4EWPfqOA=";
})
]
);
postPatch =
# This prevents cmake from using libraries in impure paths (which