mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
opencv3: cuda: add a libstdc++ integration test
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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 = [ ]; };
|
||||
|
||||
|
||||
@@ -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
|
||||
]))
|
||||
];
|
||||
} ''
|
||||
|
||||
Reference in New Issue
Block a user