nixpkgs/pkgs/development/libraries/pcl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, wrapQtAppsHook
, cmake
, qhull
, flann
, boost
, vtk
, eigen
, pkg-config
, qtbase
, libusb1
, libpcap
2021-09-09 19:38:16 +00:00
, libtiff
, libXt
, libpng
, Cocoa
, AGL
, OpenGL
2021-07-30 02:17:08 +00:00
, withCuda ? false, cudatoolkit
}:
stdenv.mkDerivation rec {
pname = "pcl";
2021-07-30 02:17:08 +00:00
version = "1.12.0";
2016-08-02 17:56:58 +00:00
src = fetchFromGitHub {
owner = "PointCloudLibrary";
repo = "pcl";
rev = "${pname}-${version}";
2021-07-30 02:17:08 +00:00
sha256 = "0jhvciaw43y6iqqk7hyxnfhn1b4bsw5fpy04s01r5pkcsjjbdbqc";
};
2021-11-14 22:12:01 +00:00
# remove attempt to prevent (x86/x87-specific) extended precision use
# when SSE not detected
postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
2021-11-14 22:12:01 +00:00
sed -i '/-ffloat-store/d' cmake/pcl_find_sse.cmake
'';
nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook ];
buildInputs = [
eigen
libusb1
libpcap
qtbase
libXt
]
2021-07-30 02:17:08 +00:00
++ lib.optionals stdenv.isDarwin [ Cocoa AGL ]
++ lib.optionals withCuda [ cudatoolkit ];
2017-10-12 05:40:37 +00:00
2021-09-09 19:38:16 +00:00
propagatedBuildInputs = [
boost
flann
libpng
libtiff
qhull
vtk
];
cmakeFlags = lib.optionals stdenv.isDarwin [
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
2021-07-30 02:17:08 +00:00
] ++ lib.optionals withCuda [ "-DWITH_CUDA=true" ];
meta = {
homepage = "https://pointclouds.org/";
description = "Open project for 2D/3D image and point cloud processing";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ viric ];
platforms = with lib.platforms; linux ++ darwin;
};
}