From 2397b818ef296d87d1b39b0c806d482ddcc1d607 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Fri, 26 Apr 2024 11:57:02 +0200 Subject: [PATCH 1/3] pinocchio: 2.7.0 -> 2.7.1 --- .../development/libraries/pinocchio/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/pinocchio/default.nix b/pkgs/development/libraries/pinocchio/default.nix index add7ef6fde22..6f59dc9c69a3 100644 --- a/pkgs/development/libraries/pinocchio/default.nix +++ b/pkgs/development/libraries/pinocchio/default.nix @@ -5,6 +5,7 @@ , boost , eigen , collisionSupport ? !stdenv.isDarwin +, jrl-cmakemodules , hpp-fcl , urdfdom , pythonSupport ? false @@ -13,14 +14,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "pinocchio"; - version = "2.7.0"; + version = "2.7.1"; src = fetchFromGitHub { owner = "stack-of-tasks"; repo = finalAttrs.pname; rev = "v${finalAttrs.version}"; - fetchSubmodules = true; - hash = "sha256-yhrG+MilGJkvwLUNTAgNhDqUWGjPswjrbg38yOLsmHc="; + hash = "sha256-Ks5dvKi5iutjM+iovDOYGx3vsr45JWRqGOXV8+Ko4gg="; }; strictDeps = true; @@ -30,6 +30,7 @@ stdenv.mkDerivation (finalAttrs: { ]; propagatedBuildInputs = [ + jrl-cmakemodules urdfdom ] ++ lib.optionals (!pythonSupport) [ boost @@ -43,15 +44,13 @@ stdenv.mkDerivation (finalAttrs: { python3Packages.hpp-fcl ]; - cmakeFlags = lib.optionals collisionSupport [ - "-DBUILD_WITH_COLLISION_SUPPORT=ON" - ] ++ lib.optionals pythonSupport [ - "-DBUILD_WITH_LIBPYTHON=ON" + cmakeFlags = [ + (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport) + (lib.cmakeBool "BUILD_WITH_LIBPYTHON" pythonSupport) + (lib.cmakeBool "BUILD_WITH_COLLISION_SUPPORT" collisionSupport) ] ++ lib.optionals (pythonSupport && stdenv.isDarwin) [ # AssertionError: '.' != '/tmp/nix-build-pinocchio-2.7.0.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; From 396d7e2e1921c3bb1a28dbf708d27395241c3396 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 13 May 2024 10:00:17 +0200 Subject: [PATCH 2/3] pinocchio: patch for example-robot-data models --- pkgs/development/libraries/pinocchio/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/pinocchio/default.nix b/pkgs/development/libraries/pinocchio/default.nix index 6f59dc9c69a3..bbdc73edc157 100644 --- a/pkgs/development/libraries/pinocchio/default.nix +++ b/pkgs/development/libraries/pinocchio/default.nix @@ -4,6 +4,7 @@ , cmake , boost , eigen +, example-robot-data , collisionSupport ? !stdenv.isDarwin , jrl-cmakemodules , hpp-fcl @@ -23,6 +24,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-Ks5dvKi5iutjM+iovDOYGx3vsr45JWRqGOXV8+Ko4gg="; }; + # example-robot-data models are used in checks. + # Upstream provide them as git submodule, but we can use our own version instead. + postPatch = '' + rmdir models/example-robot-data + ln -s ${example-robot-data.src} models/example-robot-data + ''; + strictDeps = true; nativeBuildInputs = [ From fa334d6946edaa5487d4d2bc34f2901461ca9ea5 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 13 May 2024 10:00:58 +0200 Subject: [PATCH 3/3] pinocchio: remove "with lib;" --- pkgs/development/libraries/pinocchio/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/pinocchio/default.nix b/pkgs/development/libraries/pinocchio/default.nix index bbdc73edc157..86f0c891b2a9 100644 --- a/pkgs/development/libraries/pinocchio/default.nix +++ b/pkgs/development/libraries/pinocchio/default.nix @@ -67,11 +67,11 @@ stdenv.mkDerivation (finalAttrs: { "pinocchio" ]; - meta = with lib; { + meta = { 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; [ nim65s wegank ]; - platforms = platforms.unix; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ nim65s wegank ]; + platforms = lib.platforms.unix; }; })