diff options
author | Someone Serge <sergei.kozlukov@aalto.fi> | 2023-11-30 00:44:50 +0000 |
---|---|---|
committer | Someone Serge <sergei.kozlukov@aalto.fi> | 2023-12-06 02:00:52 +0000 |
commit | ada3991349beb5880e3994f25c65a0cf68941b83 (patch) | |
tree | 4db5fe52c747aac20bdf33d8d2d387f98292a93f /pkgs/development/libraries/opencv | |
parent | be9c779deba0e898802dd341a1ba9c04c4e9abe8 (diff) |
opencv4: expose cxxdev, propagating optional cuda deps
Diffstat (limited to 'pkgs/development/libraries/opencv')
-rw-r--r-- | pkgs/development/libraries/opencv/4.x.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 4c1b13d1309e0..8cfb169a0bace 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -247,8 +247,10 @@ effectiveStdenv.mkDerivation { outputs = [ "out" + "cxxdev" "package_tests" ]; + cudaPropagateToOutput = "cxxdev"; postUnpack = lib.optionalString buildContrib '' cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/source/opencv_contrib" @@ -328,7 +330,7 @@ effectiveStdenv.mkDerivation { bzip2 AVFoundation Cocoa VideoDecodeAcceleration CoreMedia MediaToolbox Accelerate ] ++ lib.optionals enableDocs [ doxygen graphviz-nox ] - ++ lib.optionals enableCuda (with cudaPackages; [ + ++ lib.optionals enableCuda (with cudaPackages; [ cuda_cudart cuda_cccl # <thrust/*> libnpp # npp.h @@ -338,7 +340,7 @@ effectiveStdenv.mkDerivation { cudnn # cudnn.h ] ++ lib.optionals enableCufft [ libcufft # cufft.h - ]); + ]); propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy ++ lib.optionals enableCuda [ nvidia-optical-flow-sdk ]; @@ -458,6 +460,7 @@ effectiveStdenv.mkDerivation { postInstall = '' sed -i "s|{exec_prefix}/$out|{exec_prefix}|;s|{prefix}/$out|{prefix}|" \ "$out/lib/pkgconfig/opencv4.pc" + mkdir $cxxdev '' # install python distribution information, so other packages can `import opencv` + lib.optionalString enablePython '' |