about summary refs log tree commit diff
path: root/pkgs/development/libraries/example-robot-data
diff options
context:
space:
mode:
authorGuilhem Saurel <guilhem.saurel@laas.fr>2023-08-09 14:56:15 +0200
committerGuilhem Saurel <guilhem.saurel@laas.fr>2023-08-10 08:29:35 +0200
commit94924be1418c08138abb09b8bd7ac9595920ed2c (patch)
tree15533d91ea8f33f8b17be563969f4c6696e2fe42 /pkgs/development/libraries/example-robot-data
parent0c0b3af7936d868d5346f8e2fc46814ab0dfa4be (diff)
example-robot-data: add preCheck
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.
Diffstat (limited to 'pkgs/development/libraries/example-robot-data')
-rw-r--r--pkgs/development/libraries/example-robot-data/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/development/libraries/example-robot-data/default.nix b/pkgs/development/libraries/example-robot-data/default.nix
index 201275fb02ef2..d9a107bf6497b 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"
   ];