Unverified Commit 10d412d6 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

pcl: 1.13.0 -> 1.15.0-rc1, fix, cleanup (#382027)

parents c4bea8f7 744e64b5
Loading
Loading
Loading
Loading
+47 −40
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  config,
  fetchFromGitHub,
  wrapQtAppsHook,

  # nativeBuildInputs
  cmake,
  qhull,
  flann,
  boost,
  vtk,
  eigen,
  libsForQt5,
  pkg-config,
  qtbase,
  libusb1,
  libpcap,
  libtiff,

  # buildInputs
  eigen,
  libXt,
  libpcap,
  libusb1,

  # nativeBuildInputs
  boost186,
  flann,
  libpng,
  Cocoa,
  AGL,
  OpenGL,
  config,
  libtiff,
  qhull,
  vtk,

  gitUpdater,

  cudaSupport ? config.cudaSupport,
  cudaPackages,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "pcl";
  version = "1.13.0";
  version = "1.15.0-rc1";

  src = fetchFromGitHub {
    owner = "PointCloudLibrary";
    repo = "pcl";
    rev = "${pname}-${version}";
    sha256 = "sha256-JDiDAmdpwUR3Sff63ehyvetIFXAgGOrI+HEaZ5lURps=";
    tag = "pcl-${finalAttrs.version}";
    hash = "sha256-T/zvev1x4w87j6Zn9dpqwIQfmfg2MsHt2Xto8Z1vhuQ=";
  };

  # remove attempt to prevent (x86/x87-specific) extended precision use
@@ -42,26 +47,21 @@ stdenv.mkDerivation rec {
  '';

  nativeBuildInputs = [
    pkg-config
    cmake
    wrapQtAppsHook
    libsForQt5.wrapQtAppsHook
    pkg-config
  ] ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ];

  buildInputs =
    [
  buildInputs = [
    eigen
      libusb1
      libpcap
      qtbase
    libXt
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      Cocoa
      AGL
    libpcap
    libsForQt5.qtbase
    libusb1
  ];

  propagatedBuildInputs = [
    boost
    boost186
    flann
    libpng
    libtiff
@@ -69,17 +69,24 @@ stdenv.mkDerivation rec {
    vtk
  ];

  cmakeFlags =
    lib.optionals stdenv.hostPlatform.isDarwin [
      "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
    ]
    ++ lib.optionals cudaSupport [ "-DWITH_CUDA=true" ];
  cmakeFlags = lib.optionals cudaSupport [
    (lib.cmakeBool "WITH_CUDA" true)
  ];

  passthru = {
    updateScript = gitUpdater { rev-prefix = "pcl-"; };
  };

  meta = {
    homepage = "https://pointclouds.org/";
    description = "Open project for 2D/3D image and point cloud processing";
    changelog = "https://github.com/PointCloudLibrary/pcl/blob/pcl-${finalAttrs.version}/CHANGES.md";
    license = lib.licenses.bsd3;
    maintainers = [ ];
    maintainers = with lib.maintainers; [ GaetanLepage ];
    platforms = with lib.platforms; linux ++ darwin;
    badPlatforms = [
      # fatal error: 'omp.h' file not found
      lib.systems.inspect.patterns.isDarwin
    ];
  };
}
})
+31 −17
Original line number Diff line number Diff line
@@ -2,46 +2,53 @@
  lib,
  stdenv,
  fetchFromGitHub,
  pkg-config,

  # nativeBuildInputs
  cmake,
  libsForQt5,
  pkg-config,
  wrapGAppsHook3,

  # buildInputs
  opencv,
  pcl,
  liblapack,
  xorg,
  libusb1,
  eigen,
  wrapQtAppsHook,
  qtbase,
  g2o,
  ceres-solver,
  zed-open-capture,
  hidapi,
  octomap,
  freenect,
  libdc1394,
  libGL,
  libGLU,
  vtkWithQt5,
  wrapGAppsHook3,
  liblapack,
  xorg,
  zed-open-capture,
  hidapi,

  # passthru
  gitUpdater,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "rtabmap";
  version = "0.21.4.1";

  src = fetchFromGitHub {
    owner = "introlab";
    repo = "rtabmap";
    tag = version;
    tag = finalAttrs.version;
    hash = "sha256-y/p1uFSxVQNXO383DLGCg4eWW7iu1esqpWlyPMF3huk=";
  };

  nativeBuildInputs = [
    cmake
    libsForQt5.wrapQtAppsHook
    pkg-config
    wrapQtAppsHook
    wrapGAppsHook3
  ];

  buildInputs = [
    ## Required
    opencv
@@ -61,7 +68,7 @@ stdenv.mkDerivation rec {
    freenect
    libdc1394
    # librealsense - missing includedir
    qtbase
    libsForQt5.qtbase
    libGL
    libGLU
    vtkWithQt5
@@ -72,11 +79,18 @@ stdenv.mkDerivation rec {
  # Disable warnings that are irrelevant to us as packagers
  cmakeFlags = [ "-Wno-dev" ];

  meta = with lib; {
  passthru = {
    updateScript = gitUpdater { };
  };

  meta = {
    description = "Real-Time Appearance-Based 3D Mapping";
    homepage = "https://introlab.github.io/rtabmap/";
    license = licenses.bsd3;
    maintainers = with maintainers; [ marius851000 ];
    platforms = with platforms; linux;
    changelog = "https://github.com/introlab/rtabmap/releases/tag/${finalAttrs.version}";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ marius851000 ];
    platforms = with lib.platforms; linux;
    # pcl/io/io.h: No such file or directory
    broken = true;
  };
}
})
+1 −5
Original line number Diff line number Diff line
@@ -4780,7 +4780,7 @@ with pkgs;
  rocket = libsForQt5.callPackage ../tools/graphics/rocket { };
  rtabmap = libsForQt5.callPackage ../applications/video/rtabmap/default.nix {
  rtabmap = callPackage ../by-name/rt/rtabmap/package.nix {
    pcl = pcl.override { vtk = vtkWithQt5; };
  };
@@ -10219,10 +10219,6 @@ with pkgs;
    buildPythonPackage buildPythonApplication setuptools pycsdr pydigiham;
  };
  pcl = libsForQt5.callPackage ../development/libraries/pcl {
    inherit (darwin.apple_sdk_11_0.frameworks) Cocoa AGL OpenGL;
  };
  pcre = callPackage ../development/libraries/pcre { };
  pcre16 = res.pcre.override { variant = "pcre16"; };
  # pcre32 seems unused