diff --git a/pkgs/by-name/hp/hpp-fcl/package.nix b/pkgs/by-name/hp/hpp-fcl/package.nix new file mode 100644 index 000000000000..78ce6456c301 --- /dev/null +++ b/pkgs/by-name/hp/hpp-fcl/package.nix @@ -0,0 +1,81 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + doxygen, + boost, + eigen, + assimp, + octomap, + qhull, + pythonSupport ? false, + python3Packages, + zlib, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hpp-fcl"; + version = "2.4.5"; + + src = fetchFromGitHub { + owner = "humanoid-path-planner"; + repo = "hpp-fcl"; + rev = "v${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-0OORdtT7vMpvK3BPJvtvuLcz0+bfu1+nVvzs3y+LyQw="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + doxygen + ] ++ lib.optionals pythonSupport [ python3Packages.numpy ]; + + propagatedBuildInputs = + [ + assimp + qhull + octomap + zlib + ] + ++ lib.optionals (!pythonSupport) [ + boost + eigen + ] + ++ lib.optionals pythonSupport [ + python3Packages.boost + python3Packages.eigenpy + ]; + + cmakeFlags = [ + (lib.cmakeBool "HPP_FCL_HAS_QHULL" true) + (lib.cmakeBool "INSTALL_DOCUMENTATION" true) + (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport) + ]; + + doCheck = true; + # pythonImportsCheck, but in stdenv.mkDerivation + postInstall = lib.optionalString pythonSupport '' + PYTHONPATH=$out/${python3Packages.python.sitePackages}:$PYTHONPATH + python -c "import hppfcl" + ''; + + outputs = [ + "dev" + "out" + "doc" + ]; + postFixup = '' + moveToOutput share/ament_index "$dev" + moveToOutput share/${finalAttrs.pname} "$dev" + ''; + + meta = { + description = "Extension of the Flexible Collision Library"; + homepage = "https://github.com/humanoid-path-planner/hpp-fcl"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ nim65s ]; + }; +}) diff --git a/pkgs/development/libraries/hpp-fcl/default.nix b/pkgs/development/libraries/hpp-fcl/default.nix deleted file mode 100644 index 0359abec9b08..000000000000 --- a/pkgs/development/libraries/hpp-fcl/default.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, doxygen -, boost -, eigen -, assimp -, octomap -, qhull -, pythonSupport ? false -, python3Packages -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "hpp-fcl"; - version = "2.4.5"; - - src = fetchFromGitHub { - owner = "humanoid-path-planner"; - repo = "hpp-fcl"; - rev = "v${finalAttrs.version}"; - fetchSubmodules = true; - hash = "sha256-0OORdtT7vMpvK3BPJvtvuLcz0+bfu1+nVvzs3y+LyQw="; - }; - - strictDeps = true; - - nativeBuildInputs = [ - cmake - doxygen - ] ++ lib.optionals pythonSupport [ - python3Packages.numpy - ]; - - 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 = "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; - }; -}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 883cd1344453..6e9ea29abf1c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20686,8 +20686,6 @@ with pkgs; hound = callPackage ../development/tools/misc/hound { }; - hpp-fcl = callPackage ../development/libraries/hpp-fcl { }; - hpx = callPackage ../development/libraries/hpx { boost = boost179; asio = asio.override { boost = boost179; };