about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/hpp-fcl
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/hpp-fcl')
-rw-r--r--nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix63
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..ba58835ea5dd
--- /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.4";
+
+  src = fetchFromGitHub {
+    owner = "humanoid-path-planner";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
+    fetchSubmodules = true;
+    hash = "sha256-tX8AvlR/Az8fFs4ylqFijw3hXiNRoEWffmYbTcaqO90=";
+  };
+
+  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;
+  };
+})