From 9c9668ade470d9dcdff8849351429af5080fb5a2 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 6 Dec 2025 13:37:41 +0100 Subject: [PATCH] opencv: fix hardcoded source path This should fix builds for non-default fetchedSourceNameDefault and is a no-op for the default. --- pkgs/development/libraries/opencv/4.x.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 9451668a5837..452c234f646a 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -293,7 +293,7 @@ effectiveStdenv.mkDerivation { cudaPropagateToOutput = "cxxdev"; postUnpack = optionalString buildContrib '' - cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/source/opencv_contrib" + cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/${src.name}/opencv_contrib" ''; # Ensures that we use the system OpenEXR rather than the vendored copy of the source included with OpenCV. @@ -325,7 +325,7 @@ effectiveStdenv.mkDerivation { installExtraFile ade + optionalString enableIpp (installExtraFiles ippicv) + (optionalString buildContrib '' - cmakeFlagsArray+=("-DOPENCV_EXTRA_MODULES_PATH=$NIX_BUILD_TOP/source/opencv_contrib") + cmakeFlagsArray+=("-DOPENCV_EXTRA_MODULES_PATH=$NIX_BUILD_TOP/${src.name}/opencv_contrib") ${installExtraFiles vgg} ${installExtraFiles boostdesc}