mysql80: fix darwin and LLVM 19 build (#374591)
[NixPkgs.git] / pkgs / development / python-modules / pykdl / default.nix
blob6670f6d145d04c444b52db4612b25e19cdc50d5a
2   lib,
3   stdenv,
4   toPythonModule,
5   fetchpatch,
6   cmake,
7   pybind11,
8   orocos-kdl,
9   eigen,
10   python,
13 toPythonModule (
14   stdenv.mkDerivation {
15     pname = "pykdl";
16     inherit (orocos-kdl) version src;
18     sourceRoot = "${orocos-kdl.src.name}/python_orocos_kdl";
20     patches = [
21       # Support system pybind11; the vendored copy doesn't support Python 3.11
22       (fetchpatch {
23         url = "https://github.com/orocos/orocos_kinematics_dynamics/commit/e25a13fc5820dbca6b23d10506407bca9bcdd25f.patch";
24         hash = "sha256-NGMVGEYsa7hVX+SgRZgeSm93BqxFR1uiyFvzyF5H0Y4=";
25         stripLen = 1;
26       })
27     ];
29     # Fix hardcoded installation path
30     postPatch = ''
31       substituteInPlace CMakeLists.txt \
32         --replace dist-packages site-packages
33     '';
35     nativeBuildInputs = [
36       cmake
37       pybind11
38     ];
39     buildInputs = [
40       orocos-kdl
41       eigen
42     ];
43     propagatedBuildInputs = [ python ];
45     cmakeFlags = [ "-DPYTHON_EXECUTABLE=${lib.getExe python.pythonOnBuildForHost}" ];
47     meta = with lib; {
48       description = "Kinematics and Dynamics Library (Python bindings)";
49       homepage = "https://www.orocos.org/kdl.html";
50       license = licenses.lgpl21Only;
51       maintainers = with maintainers; [ lopsided98 ];
52       platforms = platforms.all;
53     };
54   }