From 452f7ac753cff5a9ca2d685f84385c5d1296b00c Mon Sep 17 00:00:00 2001 From: Harinn Date: Sat, 23 May 2026 19:48:25 +0700 Subject: [PATCH] python3Packages.sigrok: fix build with swig 4.4 --- pkgs/development/python-modules/sigrok/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/sigrok/default.nix b/pkgs/development/python-modules/sigrok/default.nix index 5a0a6997df16..e31a42e1e98f 100644 --- a/pkgs/development/python-modules/sigrok/default.nix +++ b/pkgs/development/python-modules/sigrok/default.nix @@ -25,6 +25,14 @@ toPythonModule ( ./python-install.patch ]; + postPatch = '' + ${orig.postPatch or ""} + + # %init block lands in SWIG_mod_exec (returns int) under swig >= 4.4. + substituteInPlace bindings/python/sigrok/core/classes.i \ + --replace-fail 'return nullptr;' 'return -1;' + ''; + nativeBuildInputs = orig.nativeBuildInputs or [ ] ++ [