Merge pull request #248118 from nim65s/pinocchio-2.6.20

pinocchio: 2.6.19 -> 2.6.20
This commit is contained in:
Weijia Wang 2023-08-11 15:16:03 +02:00 committed by GitHub
commit f2f0b5a129
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 8 deletions

View file

@ -33,6 +33,10 @@ stdenv.mkDerivation (finalAttrs: {
];
doCheck = true;
# The package expect to find an `example-robot-data/robots` folder somewhere
# either in install prefix or in the sources
# where it can find the meshes for unit tests
preCheck = "ln -s source ../../${finalAttrs.pname}";
pythonImportsCheck = [
"example_robot_data"
];

View file

@ -4,21 +4,23 @@
, cmake
, boost
, eigen
, collisionSupport ? !stdenv.isDarwin
, hpp-fcl
, urdfdom
, pythonSupport ? false
, python3Packages
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "pinocchio";
version = "2.6.19";
version = "2.6.20";
src = fetchFromGitHub {
owner = "stack-of-tasks";
repo = pname;
rev = "v${version}";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-P7jSAQ6LYcboJHqtpneT4W8Pu5G3fd3/a8Gju9im1e8=";
hash = "sha256-Pu/trCpqdue7sQKDbLhyxTfgj/+xRiVcG7Luz6ZQXtM=";
};
# error: use of undeclared identifier '__sincos'
@ -38,20 +40,37 @@ stdenv.mkDerivation rec {
] ++ lib.optionals (!pythonSupport) [
boost
eigen
] ++ lib.optionals (!pythonSupport && collisionSupport) [
hpp-fcl
] ++ lib.optionals pythonSupport [
python3Packages.boost
python3Packages.eigenpy
] ++ lib.optionals (pythonSupport && collisionSupport) [
python3Packages.hpp-fcl
];
cmakeFlags = lib.optionals (!pythonSupport) [
cmakeFlags = lib.optionals collisionSupport [
"-DBUILD_WITH_COLLISION_SUPPORT=ON"
] ++ lib.optionals pythonSupport [
"-DBUILD_WITH_LIBPYTHON=ON"
] ++ lib.optionals (pythonSupport && stdenv.isDarwin) [
# AssertionError: '.' != '/tmp/nix-build-pinocchio-2.6.20.drv/sou[84 chars].dae'
"-DCMAKE_CTEST_ARGUMENTS='--exclude-regex;test-py-bindings_geometry_model_urdf'"
] ++ lib.optionals (!pythonSupport) [
"-DBUILD_PYTHON_INTERFACE=OFF"
];
doCheck = true;
pythonImportsCheck = lib.optionals (!pythonSupport) [
"pinocchio"
];
meta = with lib; {
description = "A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives";
homepage = "https://github.com/stack-of-tasks/pinocchio";
license = licenses.bsd2;
maintainers = with maintainers; [ wegank ];
maintainers = with maintainers; [ nim65s wegank ];
platforms = platforms.unix;
};
}
})