Skip to content

Commit 10d412d

Browse files
authored
pcl: 1.13.0 -> 1.15.0-rc1, fix, cleanup (NixOS#382027)
2 parents c4bea8f + 744e64b commit 10d412d

File tree

3 files changed

+79
-62
lines changed

3 files changed

+79
-62
lines changed
Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
11
{
22
lib,
33
stdenv,
4+
config,
45
fetchFromGitHub,
5-
wrapQtAppsHook,
6+
7+
# nativeBuildInputs
68
cmake,
7-
qhull,
8-
flann,
9-
boost,
10-
vtk,
11-
eigen,
9+
libsForQt5,
1210
pkg-config,
13-
qtbase,
14-
libusb1,
15-
libpcap,
16-
libtiff,
11+
12+
# buildInputs
13+
eigen,
1714
libXt,
15+
libpcap,
16+
libusb1,
17+
18+
# nativeBuildInputs
19+
boost186,
20+
flann,
1821
libpng,
19-
Cocoa,
20-
AGL,
21-
OpenGL,
22-
config,
22+
libtiff,
23+
qhull,
24+
vtk,
25+
26+
gitUpdater,
27+
2328
cudaSupport ? config.cudaSupport,
2429
cudaPackages,
2530
}:
2631

27-
stdenv.mkDerivation rec {
32+
stdenv.mkDerivation (finalAttrs: {
2833
pname = "pcl";
29-
version = "1.13.0";
34+
version = "1.15.0-rc1";
3035

3136
src = fetchFromGitHub {
3237
owner = "PointCloudLibrary";
3338
repo = "pcl";
34-
rev = "${pname}-${version}";
35-
sha256 = "sha256-JDiDAmdpwUR3Sff63ehyvetIFXAgGOrI+HEaZ5lURps=";
39+
tag = "pcl-${finalAttrs.version}";
40+
hash = "sha256-T/zvev1x4w87j6Zn9dpqwIQfmfg2MsHt2Xto8Z1vhuQ=";
3641
};
3742

3843
# remove attempt to prevent (x86/x87-specific) extended precision use
@@ -42,44 +47,46 @@ stdenv.mkDerivation rec {
4247
'';
4348

4449
nativeBuildInputs = [
45-
pkg-config
4650
cmake
47-
wrapQtAppsHook
51+
libsForQt5.wrapQtAppsHook
52+
pkg-config
4853
] ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ];
4954

50-
buildInputs =
51-
[
52-
eigen
53-
libusb1
54-
libpcap
55-
qtbase
56-
libXt
57-
]
58-
++ lib.optionals stdenv.hostPlatform.isDarwin [
59-
Cocoa
60-
AGL
61-
];
55+
buildInputs = [
56+
eigen
57+
libXt
58+
libpcap
59+
libsForQt5.qtbase
60+
libusb1
61+
];
6262

6363
propagatedBuildInputs = [
64-
boost
64+
boost186
6565
flann
6666
libpng
6767
libtiff
6868
qhull
6969
vtk
7070
];
7171

72-
cmakeFlags =
73-
lib.optionals stdenv.hostPlatform.isDarwin [
74-
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
75-
]
76-
++ lib.optionals cudaSupport [ "-DWITH_CUDA=true" ];
72+
cmakeFlags = lib.optionals cudaSupport [
73+
(lib.cmakeBool "WITH_CUDA" true)
74+
];
75+
76+
passthru = {
77+
updateScript = gitUpdater { rev-prefix = "pcl-"; };
78+
};
7779

7880
meta = {
7981
homepage = "https://pointclouds.org/";
8082
description = "Open project for 2D/3D image and point cloud processing";
83+
changelog = "https://github.com/PointCloudLibrary/pcl/blob/pcl-${finalAttrs.version}/CHANGES.md";
8184
license = lib.licenses.bsd3;
82-
maintainers = [ ];
85+
maintainers = with lib.maintainers; [ GaetanLepage ];
8386
platforms = with lib.platforms; linux ++ darwin;
87+
badPlatforms = [
88+
# fatal error: 'omp.h' file not found
89+
lib.systems.inspect.patterns.isDarwin
90+
];
8491
};
85-
}
92+
})

pkgs/applications/video/rtabmap/default.nix renamed to pkgs/by-name/rt/rtabmap/package.nix

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,53 @@
22
lib,
33
stdenv,
44
fetchFromGitHub,
5-
pkg-config,
5+
6+
# nativeBuildInputs
67
cmake,
8+
libsForQt5,
9+
pkg-config,
10+
wrapGAppsHook3,
11+
12+
# buildInputs
713
opencv,
814
pcl,
15+
liblapack,
16+
xorg,
917
libusb1,
1018
eigen,
11-
wrapQtAppsHook,
12-
qtbase,
1319
g2o,
1420
ceres-solver,
15-
zed-open-capture,
16-
hidapi,
1721
octomap,
1822
freenect,
1923
libdc1394,
2024
libGL,
2125
libGLU,
2226
vtkWithQt5,
23-
wrapGAppsHook3,
24-
liblapack,
25-
xorg,
27+
zed-open-capture,
28+
hidapi,
29+
30+
# passthru
31+
gitUpdater,
2632
}:
2733

28-
stdenv.mkDerivation rec {
34+
stdenv.mkDerivation (finalAttrs: {
2935
pname = "rtabmap";
3036
version = "0.21.4.1";
3137

3238
src = fetchFromGitHub {
3339
owner = "introlab";
3440
repo = "rtabmap";
35-
tag = version;
41+
tag = finalAttrs.version;
3642
hash = "sha256-y/p1uFSxVQNXO383DLGCg4eWW7iu1esqpWlyPMF3huk=";
3743
};
3844

3945
nativeBuildInputs = [
4046
cmake
47+
libsForQt5.wrapQtAppsHook
4148
pkg-config
42-
wrapQtAppsHook
4349
wrapGAppsHook3
4450
];
51+
4552
buildInputs = [
4653
## Required
4754
opencv
@@ -61,7 +68,7 @@ stdenv.mkDerivation rec {
6168
freenect
6269
libdc1394
6370
# librealsense - missing includedir
64-
qtbase
71+
libsForQt5.qtbase
6572
libGL
6673
libGLU
6774
vtkWithQt5
@@ -72,11 +79,18 @@ stdenv.mkDerivation rec {
7279
# Disable warnings that are irrelevant to us as packagers
7380
cmakeFlags = [ "-Wno-dev" ];
7481

75-
meta = with lib; {
82+
passthru = {
83+
updateScript = gitUpdater { };
84+
};
85+
86+
meta = {
7687
description = "Real-Time Appearance-Based 3D Mapping";
7788
homepage = "https://introlab.github.io/rtabmap/";
78-
license = licenses.bsd3;
79-
maintainers = with maintainers; [ marius851000 ];
80-
platforms = with platforms; linux;
89+
changelog = "https://github.com/introlab/rtabmap/releases/tag/${finalAttrs.version}";
90+
license = lib.licenses.bsd3;
91+
maintainers = with lib.maintainers; [ marius851000 ];
92+
platforms = with lib.platforms; linux;
93+
# pcl/io/io.h: No such file or directory
94+
broken = true;
8195
};
82-
}
96+
})

pkgs/top-level/all-packages.nix

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4780,7 +4780,7 @@ with pkgs;
47804780

47814781
rocket = libsForQt5.callPackage ../tools/graphics/rocket { };
47824782

4783-
rtabmap = libsForQt5.callPackage ../applications/video/rtabmap/default.nix {
4783+
rtabmap = callPackage ../by-name/rt/rtabmap/package.nix {
47844784
pcl = pcl.override { vtk = vtkWithQt5; };
47854785
};
47864786

@@ -10219,10 +10219,6 @@ with pkgs;
1021910219
buildPythonPackage buildPythonApplication setuptools pycsdr pydigiham;
1022010220
};
1022110221

10222-
pcl = libsForQt5.callPackage ../development/libraries/pcl {
10223-
inherit (darwin.apple_sdk_11_0.frameworks) Cocoa AGL OpenGL;
10224-
};
10225-
1022610222
pcre = callPackage ../development/libraries/pcre { };
1022710223
pcre16 = res.pcre.override { variant = "pcre16"; };
1022810224
# pcre32 seems unused

0 commit comments

Comments
 (0)