Skip to content

Commit

Permalink
pinocchio: 3.1.0 -> 3.2.0 (#337942)
Browse files Browse the repository at this point in the history
  • Loading branch information
wegank authored Sep 8, 2024
2 parents 53cce2f + 497b0b9 commit 3b5b437
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions pkgs/development/libraries/pinocchio/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, casadi
, cmake
, boost
Expand All @@ -19,13 +18,13 @@

stdenv.mkDerivation (finalAttrs: {
pname = "pinocchio";
version = "3.1.0";
version = "3.2.0";

src = fetchFromGitHub {
owner = "stack-of-tasks";
repo = "pinocchio";
rev = "v${finalAttrs.version}";
hash = "sha256-WgMqb+NHnaxW9/qSZ0UGI4zGxGjh12a5DwtdX9byBiw=";
hash = "sha256-8V+n1TwFojXKOVkGG8k9aXVadt2NBFlZKba93L+NRNU=";
};

# test failure, ref https://github.com/stack-of-tasks/pinocchio/issues/2277
Expand All @@ -34,19 +33,10 @@ stdenv.mkDerivation (finalAttrs: {
--replace-fail "add_pinocchio_unit_test(force)" ""
'';

patches = [
# fix urdf & collision support on aarch64-darwin
(fetchpatch {
name = "static-pointer_cast.patch";
url = "https://github.com/stack-of-tasks/pinocchio/pull/2339/commits/ead869e8f3cce757851b9a011c4a2f55fb66582b.patch";
hash = "sha256-CkrWQJP/pPNs6B3a1FclfM7JWwkmsPzRumS46KQHv0s=";
})
];

postPatch = ''
# example-robot-data models are used in checks.
# Upstream provide them as git submodule, but we can use our own version instead.
rmdir models/example-robot-data
test -d models/example-robot-data && rmdir models/example-robot-data
ln -s ${example-robot-data.src} models/example-robot-data
# allow package:// uri use in examples
Expand Down Expand Up @@ -99,9 +89,11 @@ stdenv.mkDerivation (finalAttrs: {

doCheck = true;

pythonImportsCheck = lib.optionals (!pythonSupport) [
"pinocchio"
];
# pythonImportsCheck, but in stdenv.mkDerivation
postInstall = lib.optionalString pythonSupport ''
PYTHONPATH=$out/${python3Packages.python.sitePackages}:$PYTHONPATH
python -c "import pinocchio"
'';

meta = {
description = "Fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives";
Expand Down

0 comments on commit 3b5b437

Please sign in to comment.