tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
opencv3: cuda: add a libstdc++ integration test
Someone Serge
2 years ago
c7dbb3cc
4735963a
+12
-7
3 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
opencv
3.x.nix
4.x.nix
libstdcxx-test.nix
+6
-1
pkgs/development/libraries/opencv/3.x.nix
···
1
1
{ lib, stdenv
2
2
, fetchFromGitHub
3
3
, fetchpatch
4
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
292
-
passthru = lib.optionalAttrs enablePython { pythonPath = []; };
293
293
+
passthru = lib.optionalAttrs enablePython { pythonPath = []; } // {
294
294
+
tests = lib.optionalAttrs enableCuda {
295
295
+
no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { attrName = "opencv3"; };
296
296
+
};
297
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
498
-
no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { };
498
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
1
-
{ python3Packages, runCommand }:
1
1
+
{ python3Packages, runCommand, attrName }:
2
2
3
3
-
runCommand "${python3Packages.opencv4.pname}-libstdcxx-test"
3
3
+
runCommand "${python3Packages.${attrName}.name}-libstdcxx-test"
4
4
{
5
5
nativeBuildInputs = [
6
6
-
(python3Packages.python.withPackages (ps: with ps; [
7
7
-
(opencv4.override { enableCuda = true; })
8
8
-
scikit-image
6
6
+
(python3Packages.python.withPackages (ps: [
7
7
+
(ps.${attrName}.override { enableCuda = true; })
8
8
+
ps.scikit-image
9
9
]))
10
10
];
11
11
} ''