7 , pythonImportsCheckHook
8 , pythonCatchConflictsHook
15 # build libsigrok plus its Python bindings. Unfortunately it does not appear
16 # to be possible to build them separately, at least not easily.
17 toPythonModule ((libsigrok.override {
19 }).overrideAttrs (orig: {
20 pname = "${python.libPrefix}-sigrok";
22 patches = orig.patches or [] ++ [
23 # Makes libsigrok install the bindings into site-packages properly (like
24 # we expect) instead of making a version-specific *.egg subdirectory.
25 ./python-install.patch
28 nativeBuildInputs = orig.nativeBuildInputs or [] ++ [
33 ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
34 pythonImportsCheckHook
35 pythonCatchConflictsHook
38 buildInputs = orig.buildInputs or [] ++ [
39 pygobject3 # makes headers available the configure script checks for
42 propagatedBuildInputs = orig.propagatedBuildInputs or [] ++ [
48 ${orig.postInstall or ""}
50 # for pythonImportsCheck
51 export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
54 pythonImportsCheck = [ "sigrok" "sigrok.core" ];
57 description = "Python bindings for libsigrok";
58 maintainers = orig.meta.maintainers ++ [
59 lib.maintainers.sternenseemann