depot/third_party/nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

73 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, doxygen
, boost
, eigen
, assimp
, octomap
, qhull
, pythonSupport ? false
, python3Packages
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hpp-fcl";
version = "2.4.4";
src = fetchFromGitHub {
owner = "humanoid-path-planner";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-BwS9RSirdlD6Cqwp7KD59dkh2WsJVwdlH9LzM2AFjI4=";
};
strictDeps = true;
nativeBuildInputs = [
cmake
doxygen
];
propagatedBuildInputs = [
assimp
qhull
octomap
] ++ lib.optionals (!pythonSupport) [
boost
eigen
] ++ lib.optionals pythonSupport [
python3Packages.boost
python3Packages.eigenpy
];
cmakeFlags = [
"-DHPP_FCL_HAS_QHULL=ON"
"-DINSTALL_DOCUMENTATION=ON"
] ++ lib.optionals (!pythonSupport) [
"-DBUILD_PYTHON_INTERFACE=OFF"
];
doCheck = true;
pythonImportsCheck = lib.optionals (!pythonSupport) [
"hppfcl"
];
outputs = [ "dev" "out" "doc" ];
postFixup = ''
moveToOutput share/ament_index "$dev"
moveToOutput share/${finalAttrs.pname} "$dev"
'';
meta = with lib; {
description = "An extension of the Flexible Collision Library";
homepage = "https://github.com/humanoid-path-planner/hpp-fcl";
license = licenses.bsd3;
maintainers = with maintainers; [ nim65s ];
platforms = platforms.unix;
};
})