Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkgs/development/libraries/opencv/4.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL $NIX_BUILD_TOP exists... Can we just change these to relative paths?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried it and it looks like that one can be removed without issue, but the one that is used to add the CMake flag cannot have it removed without breaking the build (and one more remains further down in the file).
The setup all looks fairly complicated so I'd prefer to keep that kind of change out of this PR.

'';

# Ensures that we use the system OpenEXR rather than the vendored copy of the source included with OpenCV.
Expand Down Expand Up @@ -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}
Expand Down
Loading