From 94924be1418c08138abb09b8bd7ac9595920ed2c Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 9 Aug 2023 14:56:15 +0200 Subject: [PATCH] example-robot-data: add preCheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix 43 occurences of eg.: > ValueError: Mesh package://example-robot-data/robots/ur_description/meshes/ur5/collision/base.stl could not be found. Following 0c0b3af7936d868d5346f8e2fc46814ab0dfa4be, pinocchio has hpp-fcl support, so example-robot-data try to load meshes. But for `package://example-robot-data/robots/…/mesh.stl` paths to be resolved by the mesh loader, there must be a `example-robot-data/robots` folder. --- pkgs/development/libraries/example-robot-data/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/example-robot-data/default.nix b/pkgs/development/libraries/example-robot-data/default.nix index 201275fb02e..d9a107bf649 100644 --- a/pkgs/development/libraries/example-robot-data/default.nix +++ b/pkgs/development/libraries/example-robot-data/default.nix @@ -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" ];