opencv4: expose cxxdev, propagating optional cuda deps
This commit is contained in:
@@ -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 ''
|
||||
|
||||
Reference in New Issue
Block a user