opencv: fix hardcoded source path

This should fix builds for non-default fetchedSourceNameDefault and is a no-op for the default.
This commit is contained in:
Stefan Frijters
2025-12-06 13:38:20 +01:00
parent 27afbf358f
commit 9c9668ade4
+2 -2
View File
@@ -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}