From e3e9b9744192ae2ae5db6569d08cad94b8caed82 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 28 Aug 2024 15:39:57 +0200 Subject: [PATCH 1/2] pinocchio: 3.1.0 -> 3.2.0 --- .../libraries/pinocchio/default.nix | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/pinocchio/default.nix b/pkgs/development/libraries/pinocchio/default.nix index 750dc36e8a1a0..f9adc852435d0 100644 --- a/pkgs/development/libraries/pinocchio/default.nix +++ b/pkgs/development/libraries/pinocchio/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , casadi , cmake , boost @@ -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 @@ -34,15 +33,6 @@ 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. @@ -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"; From 497b0b952b4958be286cbd093238cbc37b2f576d Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 28 Aug 2024 16:55:37 +0200 Subject: [PATCH 2/2] pinocchio: ease use from upstream flake In the forthcoming upstream flake, src is overriden with current repo version, and models/example-robot-data does not exist, because it is a submodule. --- pkgs/development/libraries/pinocchio/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/pinocchio/default.nix b/pkgs/development/libraries/pinocchio/default.nix index f9adc852435d0..e03ac9ee854d0 100644 --- a/pkgs/development/libraries/pinocchio/default.nix +++ b/pkgs/development/libraries/pinocchio/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { 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