Unverified Commit c7dbb3cc authored by Someone Serge's avatar Someone Serge
Browse files

opencv3: cuda: add a libstdc++ integration test

parent 4735963a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
{ 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";
+1 −1
Original line number Diff line number Diff line
@@ -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 = [ ]; };

+5 −5
Original line number Diff line number Diff line
{ 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
    ]))
  ];
} ''