blob: 6670f6d145d04c444b52db4612b25e19cdc50d5a (
plain) (
blame)
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
47
48
49
50
51
52
53
54
55
|
{
lib,
stdenv,
toPythonModule,
fetchpatch,
cmake,
pybind11,
orocos-kdl,
eigen,
python,
}:
toPythonModule (
stdenv.mkDerivation {
pname = "pykdl";
inherit (orocos-kdl) version src;
sourceRoot = "${orocos-kdl.src.name}/python_orocos_kdl";
patches = [
# Support system pybind11; the vendored copy doesn't support Python 3.11
(fetchpatch {
url = "https://github.com/orocos/orocos_kinematics_dynamics/commit/e25a13fc5820dbca6b23d10506407bca9bcdd25f.patch";
hash = "sha256-NGMVGEYsa7hVX+SgRZgeSm93BqxFR1uiyFvzyF5H0Y4=";
stripLen = 1;
})
];
# Fix hardcoded installation path
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace dist-packages site-packages
'';
nativeBuildInputs = [
cmake
pybind11
];
buildInputs = [
orocos-kdl
eigen
];
propagatedBuildInputs = [ python ];
cmakeFlags = [ "-DPYTHON_EXECUTABLE=${lib.getExe python.pythonOnBuildForHost}" ];
meta = with lib; {
description = "Kinematics and Dynamics Library (Python bindings)";
homepage = "https://www.orocos.org/kdl.html";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ lopsided98 ];
platforms = platforms.all;
};
}
)
|