···14 sha256 = "4ClgYwiU21wHDve2q9cItSAVb9hbR2F+fJc8znGI8OA=";
15 };
1617- nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip ];
1819 buildInputs = [ qtbase ];
20···25 wrapQtApp "$out/bin/veusz"
26 '';
2728- # For some reason, if sip5 is found on the PATH, the option --sip-dir is
29- # ignored in setupPyBuildFlags, see
30- # https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L292
0031 postPatch = ''
32 substituteInPlace pyqtdistutils.py \
33- --replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/share/sip/PyQt5',"
34 patchShebangs tests/runselftest.py
35 '';
3637 # you can find these options at
38 # https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L71
039 setupPyBuildFlags = [
40- # --sip-dir does nothing here, but it should be the correct way to set the
41- # sip_dir, so I'm leaving it here for future versions
42- "--sip-dir=${python3Packages.pyqt5}/share/sip"
43 "--qt-include-dir=${qtbase.dev}/include"
44 # veusz tries to find a libinfix and fails without one
45 # but we simply don't need a libinfix, so set it to empty here
···14 sha256 = "4ClgYwiU21wHDve2q9cItSAVb9hbR2F+fJc8znGI8OA=";
15 };
1617+ nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip_4 ];
1819 buildInputs = [ qtbase ];
20···25 wrapQtApp "$out/bin/veusz"
26 '';
2728+ # Since sip 6 (we use sip 4 here, but pyqt5 is built with sip 6), sip files are
29+ # placed in a different directory layout and --sip-dir won't work anymore.
30+ # --sip-dir expects a directory with a PyQt5 subdirectory (where sip files are located),
31+ # but the new directory layout places sip files in a subdirectory named 'bindings'.
32+ # To workaround this, we patch the full path into pyqtdistutils.py.
33 postPatch = ''
34 substituteInPlace pyqtdistutils.py \
35+ --replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings',"
36 patchShebangs tests/runselftest.py
37 '';
3839 # you can find these options at
40 # https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L71
41+ # --sip-dir cannot be used here for the reasons explained above
42 setupPyBuildFlags = [
00043 "--qt-include-dir=${qtbase.dev}/include"
44 # veusz tries to find a libinfix and fails without one
45 # but we simply don't need a libinfix, so set it to empty here
···21 1 file changed, 11 insertions(+), 2 deletions(-)
2223diff --git a/configure.py b/configure.py
24-index a3450ca3..440d90a2 100644
25--- a/configure.py
26+++ b/configure.py
27@@ -905,6 +905,9 @@ class TargetConfiguration:
···34 if opts.pyuicinterpreter is not None:
35 self.pyuic_interpreter = opts.pyuicinterpreter
3637-@@ -1184,6 +1187,11 @@ def create_optparser(target_config):
38 metavar="DIR",
39 help="the directory containing the dbus/dbus-python.h header is "
40 "DIR [default: supplied by pkg-config]")
···46 p.add_option_group(g)
4748 # Installation.
49-@@ -2149,7 +2157,7 @@ def check_dbus(target_config, verbose):
5051 inform("Checking to see if the dbus support module should be built...")
52···5556 if verbose:
57 sys.stdout.write(cmd + "\n")
58-@@ -2178,7 +2186,8 @@ def check_dbus(target_config, verbose):
59 inform("The Python dbus module doesn't seem to be installed.")
60 return
61···6566 # Try and find dbus-python.h. We don't use pkg-config because it is broken
67 # for dbus-python (at least for versions up to and including v0.81.0).
68---
69-2.18.0
70-0000000000
···21 1 file changed, 11 insertions(+), 2 deletions(-)
2223diff --git a/configure.py b/configure.py
24+index c6663e4..65e7da7 100644
25--- a/configure.py
26+++ b/configure.py
27@@ -905,6 +905,9 @@ class TargetConfiguration:
···34 if opts.pyuicinterpreter is not None:
35 self.pyuic_interpreter = opts.pyuicinterpreter
3637+@@ -1191,6 +1194,11 @@ def create_optparser(target_config):
38 metavar="DIR",
39 help="the directory containing the dbus/dbus-python.h header is "
40 "DIR [default: supplied by pkg-config]")
···46 p.add_option_group(g)
4748 # Installation.
49+@@ -2277,7 +2285,7 @@ def check_dbus(target_config, verbose):
5051 inform("Checking to see if the dbus support module should be built...")
52···5556 if verbose:
57 sys.stdout.write(cmd + "\n")
58+@@ -2307,7 +2315,8 @@ def check_dbus(target_config, verbose):
59 inform("The Python dbus module doesn't seem to be installed.")
60 return
61···6566 # Try and find dbus-python.h. We don't use pkg-config because it is broken
67 # for dbus-python (at least for versions up to and including v0.81.0).
68+diff --git a/project.py b/project.py
69+index fe9fbce..9ae1ca1 100644
70+--- a/project.py
71++++ b/project.py
72+@@ -261,7 +261,7 @@ del find_qt
73+ dbus_lib_dirs = []
74+ dbus_libs = []
75+76+- args = ['pkg-config', '--cflags-only-I', '--libs dbus-1']
77++ args = ['pkg-config', '--cflags-only-I', '--libs dbus-1', 'dbus-python']
78+79+ for line in self.read_command_pipe(args, fatal=False):
80+ for flag in line.strip().split():