diff options
author | Someone Serge <sergei.kozlukov@aalto.fi> | 2023-11-02 18:18:35 +0000 |
---|---|---|
committer | Someone Serge <sergei.kozlukov@aalto.fi> | 2023-11-02 19:13:31 +0000 |
commit | a122884cb3709ef64c694d2658127a50dba2524b (patch) | |
tree | 44829f24241657c15f476e25eef9ed7daa9ec51a /pkgs/development/libraries/opencv | |
parent | edbe9ad5e0a129424abdde36a0124333213fc667 (diff) | |
download | nixpkgs-a122884cb3709ef64c694d2658127a50dba2524b.tar nixpkgs-a122884cb3709ef64c694d2658127a50dba2524b.tar.gz nixpkgs-a122884cb3709ef64c694d2658127a50dba2524b.tar.bz2 nixpkgs-a122884cb3709ef64c694d2658127a50dba2524b.tar.lz nixpkgs-a122884cb3709ef64c694d2658127a50dba2524b.tar.xz nixpkgs-a122884cb3709ef64c694d2658127a50dba2524b.tar.zst nixpkgs-a122884cb3709ef64c694d2658127a50dba2524b.zip |
opencv4: cuda: add a libstdc++ integration test
Diffstat (limited to 'pkgs/development/libraries/opencv')
-rw-r--r-- | pkgs/development/libraries/opencv/4.x.nix | 5 | ||||
-rw-r--r-- | pkgs/development/libraries/opencv/libstdcxx-test.nix | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 68099a57c63..ab7eb5c3ca0 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -495,8 +495,11 @@ stdenv.mkDerivation { opencv4-tests = callPackage ./tests.nix { inherit enableGStreamer enableGtk2 enableGtk3 runAccuracyTests runPerformanceTests testDataSrc; inherit opencv4; - }; }; + } + // lib.optionalAttrs (enableCuda) { + no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { }; + }; } // lib.optionalAttrs enablePython { pythonPath = [ ]; }; meta = with lib; { diff --git a/pkgs/development/libraries/opencv/libstdcxx-test.nix b/pkgs/development/libraries/opencv/libstdcxx-test.nix new file mode 100644 index 00000000000..aab1101883c --- /dev/null +++ b/pkgs/development/libraries/opencv/libstdcxx-test.nix @@ -0,0 +1,17 @@ +{ python3Packages, runCommand }: + +runCommand "${python3Packages.opencv4.pname}-libstdcxx-test" +{ + nativeBuildInputs = [ + (python3Packages.python.withPackages (ps: with ps; [ + (opencv4.override { enableCuda = true; }) + scikit-image + ])) + ]; +} '' + python << EOF + import cv2 + from skimage.transform import pyramid_reduce + EOF + touch $out +'' |