opencv: remove CUDA toolkit (#419716)
This commit is contained in:
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
obs-studio
|
||||
onnxruntime
|
||||
opencv
|
||||
opencv.cxxdev
|
||||
qt6.qtbase
|
||||
curl
|
||||
];
|
||||
|
||||
@@ -106,7 +106,7 @@ stdenv.mkDerivation rec {
|
||||
webkitgtk_4_0
|
||||
wxGTK'
|
||||
xorg.libX11
|
||||
opencv
|
||||
opencv.cxxdev
|
||||
]
|
||||
++ lib.optionals withSystemd [ systemd ]
|
||||
++ checkInputs;
|
||||
|
||||
@@ -57,7 +57,7 @@ stdenv.mkDerivation {
|
||||
libGL
|
||||
lz4
|
||||
magic-enum
|
||||
opencv
|
||||
opencv.cxxdev
|
||||
tbb
|
||||
xorg.libX11
|
||||
];
|
||||
|
||||
@@ -116,7 +116,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
webkitgtk_4_0
|
||||
wxGTK'
|
||||
xorg.libX11
|
||||
opencv
|
||||
opencv.cxxdev
|
||||
libnoise
|
||||
]
|
||||
++ lib.optionals withSystemd [ systemd ]
|
||||
|
||||
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
exiv2
|
||||
mpv
|
||||
opencv4
|
||||
opencv4.cxxdev
|
||||
libsForQt5.qtbase
|
||||
libsForQt5.qtimageformats
|
||||
libsForQt5.qtsvg
|
||||
|
||||
@@ -129,7 +129,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
flatbuffers
|
||||
llvm_18
|
||||
libSM
|
||||
opencv
|
||||
opencv.cxxdev
|
||||
cubeb
|
||||
]
|
||||
++ lib.optional faudioSupport faudio
|
||||
|
||||
@@ -585,17 +585,13 @@ effectiveStdenv.mkDerivation {
|
||||
mkdir -p "$cxxdev/nix-support"
|
||||
echo "''${!outputDev}" >> "$cxxdev/nix-support/propagated-build-inputs"
|
||||
''
|
||||
# hard-wire CUDA_TOOLKIT_ROOT_DIR so FindCUDA sees the toolkit
|
||||
# remove the requirement that the exact same version of CUDA is used in packages
|
||||
# consuming OpenCV's CMakes files
|
||||
# consuming OpenCV's CMakes files
|
||||
+ optionalString enableCuda ''
|
||||
sed -i '1s;^;set(CUDA_TOOLKIT_ROOT_DIR ${cudaPackages.cudatoolkit})\n;' \
|
||||
"$out/lib/cmake/opencv4/OpenCVConfig.cmake"
|
||||
|
||||
substituteInPlace "$out/lib/cmake/opencv4/OpenCVConfig.cmake" \
|
||||
--replace-fail \
|
||||
'find_host_package(CUDA ''${OpenCV_CUDA_VERSION} EXACT REQUIRED)' \
|
||||
'find_host_package(CUDA REQUIRED)' \
|
||||
'find_host_package(CUDAToolkit REQUIRED)' \
|
||||
--replace-fail \
|
||||
'message(FATAL_ERROR "OpenCV static library was compiled with CUDA' \
|
||||
'message("OpenCV static library was compiled with CUDA'
|
||||
|
||||
Reference in New Issue
Block a user