Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11 36 lines 1.1 kB view raw
1{ lib, stdenv, toPythonModule, fetchpatch, cmake, pybind11, orocos-kdl, eigen 2, python }: 3 4toPythonModule (stdenv.mkDerivation { 5 pname = "pykdl"; 6 inherit (orocos-kdl) version src; 7 8 sourceRoot = "${orocos-kdl.src.name}/python_orocos_kdl"; 9 10 patches = [ 11 # Support system pybind11; the vendored copy doesn't support Python 3.11 12 (fetchpatch { 13 url = "https://github.com/orocos/orocos_kinematics_dynamics/commit/e25a13fc5820dbca6b23d10506407bca9bcdd25f.patch"; 14 hash = "sha256-NGMVGEYsa7hVX+SgRZgeSm93BqxFR1uiyFvzyF5H0Y4="; 15 stripLen = 1; 16 }) 17 ]; 18 19 # Fix hardcoded installation path 20 postPatch = '' 21 substituteInPlace CMakeLists.txt \ 22 --replace dist-packages site-packages 23 ''; 24 25 nativeBuildInputs = [ cmake pybind11 ]; 26 buildInputs = [ orocos-kdl eigen ]; 27 propagatedBuildInputs = [ python ]; 28 29 meta = with lib; { 30 description = "Kinematics and Dynamics Library (Python bindings)"; 31 homepage = "https://www.orocos.org/kdl.html"; 32 license = licenses.lgpl21Only; 33 maintainers = with maintainers; [ lopsided98 ]; 34 platforms = platforms.all; 35 }; 36})