···1414 sha256 = "4ClgYwiU21wHDve2q9cItSAVb9hbR2F+fJc8znGI8OA=";
1515 };
16161717- nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip ];
1717+ nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip_4 ];
18181919 buildInputs = [ qtbase ];
2020···2525 wrapQtApp "$out/bin/veusz"
2626 '';
27272828- # For some reason, if sip5 is found on the PATH, the option --sip-dir is
2929- # ignored in setupPyBuildFlags, see
3030- # https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L292
2828+ # Since sip 6 (we use sip 4 here, but pyqt5 is built with sip 6), sip files are
2929+ # placed in a different directory layout and --sip-dir won't work anymore.
3030+ # --sip-dir expects a directory with a PyQt5 subdirectory (where sip files are located),
3131+ # but the new directory layout places sip files in a subdirectory named 'bindings'.
3232+ # To workaround this, we patch the full path into pyqtdistutils.py.
3133 postPatch = ''
3234 substituteInPlace pyqtdistutils.py \
3333- --replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/share/sip/PyQt5',"
3535+ --replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings',"
3436 patchShebangs tests/runselftest.py
3537 '';
36383739 # you can find these options at
3840 # https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L71
4141+ # --sip-dir cannot be used here for the reasons explained above
3942 setupPyBuildFlags = [
4040- # --sip-dir does nothing here, but it should be the correct way to set the
4141- # sip_dir, so I'm leaving it here for future versions
4242- "--sip-dir=${python3Packages.pyqt5}/share/sip"
4343 "--qt-include-dir=${qtbase.dev}/include"
4444 # veusz tries to find a libinfix and fails without one
4545 # but we simply don't need a libinfix, so set it to empty here