blob: fe452c73b4395e64266e2cc760424fea0e417d58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
{
lib,
toPythonModule,
pythonImportsCheckHook,
example-robot-data,
python,
pinocchio,
buildStandalone ? true,
}:
toPythonModule (
example-robot-data.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" buildStandalone)
];
nativeBuildInputs = super.nativeBuildInputs ++ [
python
];
propagatedBuildInputs = [
pinocchio
]
++ super.propagatedBuildInputs
++ lib.optional buildStandalone example-robot-data;
nativeCheckInputs = [
pythonImportsCheckHook
];
# 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 ../../example-robot-data
'';
pythonImportsCheck = [ "example_robot_data" ];
})
)
|