diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/hpp-fcl')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix b/nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix new file mode 100644 index 000000000000..53bd7f067b29 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix @@ -0,0 +1,63 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +, boost +, eigen +, assimp +, octomap +, qhull +, pythonSupport ? false +, python3Packages +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hpp-fcl"; + version = "2.3.7"; + + src = fetchFromGitHub { + owner = "humanoid-path-planner"; + repo = finalAttrs.pname; + rev = "v${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-Bytm5uaHYsfMeZ+JKs75003iHNObRBGDpV7Rz9yW7jQ="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ]; + + propagatedBuildInputs = [ + assimp + qhull + octomap + ] ++ lib.optionals (!pythonSupport) [ + boost + eigen + ] ++ lib.optionals pythonSupport [ + python3Packages.boost + python3Packages.eigenpy + ]; + + cmakeFlags = [ + "-DHPP_FCL_HAS_QHULL=ON" + ] ++ lib.optionals (!pythonSupport) [ + "-DBUILD_PYTHON_INTERFACE=OFF" + ]; + + doCheck = true; + pythonImportsCheck = lib.optionals (!pythonSupport) [ + "hppfcl" + ]; + + 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; + }; +}) |