btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / hp / hpp-fcl / package.nix
blob80e715425034dbc5376a7bef1df161effe05ed2f
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   cmake,
6   doxygen,
7   boost,
8   eigen,
9   assimp,
10   octomap,
11   qhull,
12   pythonSupport ? false,
13   python3Packages,
14   zlib,
17 stdenv.mkDerivation (finalAttrs: {
18   pname = "hpp-fcl";
19   version = "2.4.5";
21   src = fetchFromGitHub {
22     owner = "humanoid-path-planner";
23     repo = "hpp-fcl";
24     rev = "v${finalAttrs.version}";
25     fetchSubmodules = true;
26     hash = "sha256-0OORdtT7vMpvK3BPJvtvuLcz0+bfu1+nVvzs3y+LyQw=";
27   };
29   strictDeps = true;
31   nativeBuildInputs =
32     [
33       cmake
34       doxygen
35     ]
36     ++ lib.optionals pythonSupport [
37       python3Packages.numpy
38       python3Packages.pythonImportsCheckHook
39     ];
41   propagatedBuildInputs =
42     [
43       assimp
44       qhull
45       octomap
46       zlib
47     ]
48     ++ lib.optionals (!pythonSupport) [
49       boost
50       eigen
51     ]
52     ++ lib.optionals pythonSupport [
53       python3Packages.boost
54       python3Packages.eigenpy
55     ];
57   cmakeFlags = [
58     (lib.cmakeBool "HPP_FCL_HAS_QHULL" true)
59     (lib.cmakeBool "INSTALL_DOCUMENTATION" true)
60     (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
61   ];
63   doCheck = true;
64   pythonImportsCheck = [ "hppfcl" ];
66   outputs = [
67     "dev"
68     "out"
69     "doc"
70   ];
71   postFixup = ''
72     moveToOutput share/ament_index "$dev"
73     moveToOutput share/${finalAttrs.pname} "$dev"
74   '';
76   meta = {
77     description = "Extension of the Flexible Collision Library";
78     homepage = "https://github.com/humanoid-path-planner/hpp-fcl";
79     license = lib.licenses.bsd3;
80     maintainers = with lib.maintainers; [ nim65s ];
81     platforms = lib.platforms.unix;
82   };