mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
veusz: fix PyQt5 sip path and use sip 4
veusz tries to use the `sip` binary, which is no longer available in sip 6
This commit is contained in:
parent
3b6066299d
commit
52457525ad
@ -14,7 +14,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
sha256 = "4ClgYwiU21wHDve2q9cItSAVb9hbR2F+fJc8znGI8OA=";
|
sha256 = "4ClgYwiU21wHDve2q9cItSAVb9hbR2F+fJc8znGI8OA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip ];
|
nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip_4 ];
|
||||||
|
|
||||||
buildInputs = [ qtbase ];
|
buildInputs = [ qtbase ];
|
||||||
|
|
||||||
@ -25,21 +25,21 @@ python3Packages.buildPythonApplication rec {
|
|||||||
wrapQtApp "$out/bin/veusz"
|
wrapQtApp "$out/bin/veusz"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# For some reason, if sip5 is found on the PATH, the option --sip-dir is
|
# Since sip 6 (we use sip 4 here, but pyqt5 is built with sip 6), sip files are
|
||||||
# ignored in setupPyBuildFlags, see
|
# placed in a different directory layout and --sip-dir won't work anymore.
|
||||||
# https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L292
|
# --sip-dir expects a directory with a PyQt5 subdirectory (where sip files are located),
|
||||||
|
# but the new directory layout places sip files in a subdirectory named 'bindings'.
|
||||||
|
# To workaround this, we patch the full path into pyqtdistutils.py.
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pyqtdistutils.py \
|
substituteInPlace pyqtdistutils.py \
|
||||||
--replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/share/sip/PyQt5',"
|
--replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings',"
|
||||||
patchShebangs tests/runselftest.py
|
patchShebangs tests/runselftest.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# you can find these options at
|
# you can find these options at
|
||||||
# https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L71
|
# https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L71
|
||||||
|
# --sip-dir cannot be used here for the reasons explained above
|
||||||
setupPyBuildFlags = [
|
setupPyBuildFlags = [
|
||||||
# --sip-dir does nothing here, but it should be the correct way to set the
|
|
||||||
# sip_dir, so I'm leaving it here for future versions
|
|
||||||
"--sip-dir=${python3Packages.pyqt5}/share/sip"
|
|
||||||
"--qt-include-dir=${qtbase.dev}/include"
|
"--qt-include-dir=${qtbase.dev}/include"
|
||||||
# veusz tries to find a libinfix and fails without one
|
# veusz tries to find a libinfix and fails without one
|
||||||
# but we simply don't need a libinfix, so set it to empty here
|
# but we simply don't need a libinfix, so set it to empty here
|
||||||
|
Loading…
Reference in New Issue
Block a user