opencv3: cuda: add a libstdc++ integration test

This commit is contained in:
Someone Serge
2023-11-02 18:35:26 +00:00
parent 4735963a24
commit c7dbb3ccc9
3 changed files with 12 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, callPackage
, cmake, pkg-config, unzip, zlib, pcre, hdf5
, glog, boost, gflags, protobuf3_21
, config
@@ -289,7 +290,11 @@ stdenv.mkDerivation {
hardeningDisable = [ "bindnow" "relro" ];
passthru = lib.optionalAttrs enablePython { pythonPath = []; };
passthru = lib.optionalAttrs enablePython { pythonPath = []; } // {
tests = lib.optionalAttrs enableCuda {
no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { attrName = "opencv3"; };
};
};
meta = with lib; {
description = "Open Computer Vision Library with more than 500 algorithms";

View File

@@ -495,7 +495,7 @@ effectiveStdenv.mkDerivation {
};
}
// lib.optionalAttrs (enableCuda) {
no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { };
no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { attrName = "opencv4"; };
};
} // lib.optionalAttrs enablePython { pythonPath = [ ]; };

View File

@@ -1,11 +1,11 @@
{ python3Packages, runCommand }:
{ python3Packages, runCommand, attrName }:
runCommand "${python3Packages.opencv4.pname}-libstdcxx-test"
runCommand "${python3Packages.${attrName}.name}-libstdcxx-test"
{
nativeBuildInputs = [
(python3Packages.python.withPackages (ps: with ps; [
(opencv4.override { enableCuda = true; })
scikit-image
(python3Packages.python.withPackages (ps: [
(ps.${attrName}.override { enableCuda = true; })
ps.scikit-image
]))
];
} ''