about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libpointmatcher/default.nix
blob: 01c3e3e87e43f1761e75507b3d05f2d48148a3a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, stdenv, fetchFromGitHub, cmake, eigen, boost, libnabo }:

stdenv.mkDerivation rec {
  pname = "libpointmatcher";
  version = "1.3.1";

  src = fetchFromGitHub {
    owner = "ethz-asl";
    repo = pname;
    rev = version;
    sha256 = "0lai6sr3a9dj1j4pgjjyp7mx10wixy5wpvbka8nsc2danj6xhdyd";
  };

  nativeBuildInputs = [ cmake ];
  buildInputs = [ eigen boost libnabo ];

  cmakeFlags = [
    "-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3"
  ];

  doCheck = true;
  checkPhase = ''
    ./utest/utest --path ../examples/data/
  '';

  meta = with lib; {
    inherit (src.meta) homepage;
    description = "An \"Iterative Closest Point\" library for 2-D/3-D mapping in robotic";
    license = licenses.bsd3;
    platforms = [ "x86_64-linux" ];
    maintainers = with maintainers; [ cryptix ];
  };
}