lol

opencv3: cuda: add a libstdc++ integration test

+12 -7
+6 -1
pkgs/development/libraries/opencv/3.x.nix
··· 1 1 { lib, stdenv 2 2 , fetchFromGitHub 3 3 , fetchpatch 4 + , callPackage 4 5 , cmake, pkg-config, unzip, zlib, pcre, hdf5 5 6 , glog, boost, gflags, protobuf3_21 6 7 , config ··· 289 290 290 291 hardeningDisable = [ "bindnow" "relro" ]; 291 292 292 - passthru = lib.optionalAttrs enablePython { pythonPath = []; }; 293 + passthru = lib.optionalAttrs enablePython { pythonPath = []; } // { 294 + tests = lib.optionalAttrs enableCuda { 295 + no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { attrName = "opencv3"; }; 296 + }; 297 + }; 293 298 294 299 meta = with lib; { 295 300 description = "Open Computer Vision Library with more than 500 algorithms";
+1 -1
pkgs/development/libraries/opencv/4.x.nix
··· 495 495 }; 496 496 } 497 497 // lib.optionalAttrs (enableCuda) { 498 - no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { }; 498 + no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { attrName = "opencv4"; }; 499 499 }; 500 500 } // lib.optionalAttrs enablePython { pythonPath = [ ]; }; 501 501
+5 -5
pkgs/development/libraries/opencv/libstdcxx-test.nix
··· 1 - { python3Packages, runCommand }: 1 + { python3Packages, runCommand, attrName }: 2 2 3 - runCommand "${python3Packages.opencv4.pname}-libstdcxx-test" 3 + runCommand "${python3Packages.${attrName}.name}-libstdcxx-test" 4 4 { 5 5 nativeBuildInputs = [ 6 - (python3Packages.python.withPackages (ps: with ps; [ 7 - (opencv4.override { enableCuda = true; }) 8 - scikit-image 6 + (python3Packages.python.withPackages (ps: [ 7 + (ps.${attrName}.override { enableCuda = true; }) 8 + ps.scikit-image 9 9 ])) 10 10 ]; 11 11 } ''