klipper: fix cross

This commit is contained in:
matthewcroughan
2026-04-21 13:20:29 +01:00
parent cbd5a8b25b
commit de106f53f2
2 changed files with 21 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py
index c26196e..b00bd97 100644
--- a/chelper/__init__.py
+++ b/chelper/__init__.py
@@ -318,11 +318,6 @@ def get_ffi():
FFI_main = cffi.FFI()
for d in defs_all:
FFI_main.cdef(d)
- FFI_lib = FFI_main.dlopen(destlib)
- # Setup error logging
- pyhelper_logging_callback = FFI_main.callback("void func(const char *)",
- logging_callback)
- FFI_lib.set_python_logging_callback(pyhelper_logging_callback)
return FFI_main, FFI_lib
+7 -1
View File
@@ -3,6 +3,7 @@
lib,
fetchFromGitHub,
python3,
python3Packages,
extraPythonPackages ? ps: [ ],
unstableGitUpdater,
makeWrapper,
@@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
# NB: This is needed for the postBuild step
nativeBuildInputs = [
(python3.withPackages (p: with p; [ cffi ]))
python3Packages.cffi
makeWrapper
];
@@ -62,6 +63,11 @@ stdenv.mkDerivation rec {
--replace 'GCC_CMD = "gcc"' 'GCC_CMD = "${stdenv.cc.targetPrefix}cc"'
'';
patches = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# https://github.com/Klipper3d/klipper/pull/7254
./cross-ffi.patch
];
pythonInterpreter =
(python3.withPackages (
p: with p; [