Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyQt6: init at 6.4.0 #186689

Merged
merged 2 commits into from
Oct 6, 2022
Merged

PyQt6: init at 6.4.0 #186689

merged 2 commits into from
Oct 6, 2022

Conversation

LunNova
Copy link
Member

@LunNova LunNova commented Aug 14, 2022

Description of changes

Fixes #186599
Replaces #177530, #174306, #175510

Also needed for #186570

meme where everything goes wrong

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

cc @NickCao @ttuegel @milahu

@LunNova
Copy link
Member Author

LunNova commented Aug 14, 2022

Almost working, PyQt6's QML bindings aren't building due to:

g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_QML_LIB -DQT_QMLINTEGRATION_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../>
  cfgtest_QtQml.cpp:1:10: fatal error: qjsengine.h: No such file or directory
      1 | #include <qjsengine.h>
        |          ^~~~~~~~~~~~~

This does work in #177530, but that is way more complicated since it uses qmake2cmake.

Hoping to find a fix which works with my simple approach and stays close to the upstream build.

@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from f78a3c0 to 0ae96cc Compare August 14, 2022 20:18
@LunNova
Copy link
Member Author

LunNova commented Aug 14, 2022

python3.10-PyQt6>   Checking to see if the QtQuick bindings can be built...
python3.10-PyQt6>   /nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/bin/qmake QtQuick.pro
python3.10-PyQt6>   Info: creating stash file /build/tmpt3o3odyc/cfgtest_QtQuick/.qmake.stash
python3.10-PyQt6>   make
python3.10-PyQt6>   g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QMLINTEGRATION_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../PyQt6-6.3.1/qpy/QtQuick -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQuick -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtOpenGL -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtGui -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQmlModels -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQml -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQmlIntegration -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtNetwork -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtCore -I. -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/mkspecs/linux-g++ -o cfgtest_QtQuick.o cfgtest_QtQuick.cpp
python3.10-PyQt6>   g++ -Wl,-O1 -Wl,-rpath,/nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib -Wl,-rpath-link,/nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib -o QtQuick  cfgtest_QtQuick.o   /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6Quick.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6QmlModels.so -lQt6OpenGL -lQt6Gui /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6OpenGL.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Gui.so /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6QmlModels.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Qml.so /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6Qml.so -lQt6Network -lQt6Core /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Network.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Core.so -lpthread -lGLX -lOpenGL
python3.10-PyQt6>   /nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: cannot find /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6QmlModels.so: No such file or directory
python3.10-PyQt6>   /nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: cannot find /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Qml.so: No such file or directory
python3.10-PyQt6>   collect2: error: ld returned 1 exit status
python3.10-PyQt6>   make: *** [Makefile:217: QtQuick] Error 1
python3.10-PyQt6>   Checking to see if the QtQuick3D bindings can be built...
python3.10-PyQt6>   /nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/bin/qmake QtQuick3D.pro
python3.10-PyQt6>   Info: creating stash file /build/tmpt3o3odyc/cfgtest_QtQuick3D/.qmake.stash
python3.10-PyQt6>   make
python3.10-PyQt6>   g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK3D_LIB -DQT_QUICK3DRUNTIMERENDER_LIB -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_QUICK3DUTILS_LIB -DQT_SHADERTOOLS_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QMLINTEGRATION_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/nix/store/lhl4f2qqq9lbx2mp04s2dws0gp5cw0wf-qtquick3d-6.3.1-dev/include/QtQuick3D -I/nix/store/lhl4f2qqq9lbx2mp04s2dws0gp5cw0wf-qtquick3d-6.3.1-dev/include/QtQuick3DRuntimeRender -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQuick -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtOpenGL -I/nix/store/lhl4f2qqq9lbx2mp04s2dws0gp5cw0wf-qtquick3d-6.3.1-dev/include/QtQuick3DUtils -I/nix/store/bwv8517bfy82546k9xskxgj37l16477l-qtshadertools-6.3.1-dev/include/QtShaderTools -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtGui -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQmlModels -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQml -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQmlIntegration -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtNetwork -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtCore -I. -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/mkspecs/linux-g++ -o cfgtest_QtQuick3D.o cfgtest_QtQuick3D.cpp
python3.10-PyQt6>   g++ -Wl,-O1 -Wl,-rpath,/nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib -Wl,-rpath-link,/nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib -Wl,-rpath-link,/nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib -o QtQuick3D  cfgtest_QtQuick3D.o   /nix/store/1xk139b4i19falhrp96jh3dk1ccvdyx6-qtquick3d-6.3.1/lib/libQt6Quick3D.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Quick3DRuntimeRender.so /nix/store/1xk139b4i19falhrp96jh3dk1ccvdyx6-qtquick3d-6.3.1/lib/libQt6Quick3DRuntimeRender.so -lQt6Quick -lQt6QmlModels -lQt6Qml /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Quick3DUtils.so -lQt6ShaderTools /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6Quick.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6QmlModels.so -lQt6OpenGL /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6OpenGL.so /nix/store/1xk139b4i19falhrp96jh3dk1ccvdyx6-qtquick3d-6.3.1/lib/libQt6Quick3DUtils.so /nix/store/xzxrw0higfbbzyl5b8blly0d97y4317w-qtshadertools-6.3.1/lib/libQt6ShaderTools.so -lQt6Gui /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Gui.so /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6QmlModels.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Qml.so /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6Qml.so -lQt6Network -lQt6Core /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Network.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Core.so -lpthread -lGLX -lOpenGL
python3.10-PyQt6>   /nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: cannot find /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Quick3DRuntimeRender.so: No such file or directory
python3.10-PyQt6>   /nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: cannot find /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Quick3DUtils.so: No such file or directory
python3.10-PyQt6>   /nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: cannot find /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6QmlModels.so: No such file or directory
python3.10-PyQt6>   /nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: cannot find /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Qml.so: No such file or directory
python3.10-PyQt6>   collect2: error: ld returned 1 exit status
python3.10-PyQt6>   make: *** [Makefile:217: QtQuick3D] Error 1
python3.10-PyQt6>   Checking to see if the QtQuickWidgets bindings can be built...
python3.10-PyQt6>   /nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/bin/qmake QtQuickWidgets.pro
python3.10-PyQt6>   Info: creating stash file /build/tmpt3o3odyc/cfgtest_QtQuickWidgets/.qmake.stash
python3.10-PyQt6>   make
python3.10-PyQt6>   g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QMLINTEGRATION_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQuickWidgets -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQuick -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtOpenGL -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtWidgets -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtGui -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQmlModels -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQml -I/nix/store/yxvkrganirn6r76irclbrwq5k5w3y8hf-qtdeclarative-6.3.1-dev/include/QtQmlIntegration -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtNetwork -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/include/QtCore -I. -I/nix/store/i7san4l4akqjnx7pkh2z8dnwhai7brk8-qtbase-6.3.1-dev/mkspecs/linux-g++ -o cfgtest_QtQuickWidgets.o cfgtest_QtQuickWidgets.cpp
python3.10-PyQt6>   g++ -Wl,-O1 -Wl,-rpath,/nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib -Wl,-rpath-link,/nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib -o QtQuickWidgets  cfgtest_QtQuickWidgets.o   /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6QuickWidgets.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Quick.so -lQt6Widgets /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6Quick.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6QmlModels.so -lQt6OpenGL -lQt6Gui /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6OpenGL.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Widgets.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Gui.so /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6QmlModels.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Qml.so /nix/store/hw8jih0w968jv18pqa1vl6zsmwrbinsq-qtdeclarative-6.3.1/lib/libQt6Qml.so -lQt6Network -lQt6Core /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Network.so /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Core.so -lpthread -lGLX -lOpenGL
python3.10-PyQt6>   /nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: cannot find /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Quick.so: No such file or directory
python3.10-PyQt6>   /nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: cannot find /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6QmlModels.so: No such file or directory
python3.10-PyQt6>   /nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: cannot find /nix/store/a15d7a9j7hmq2y8yidpn42803ixlhsff-qtbase-6.3.1/lib/libQt6Qml.so: No such file or directory

Need to fix finding the .so files for things outside of QtBase so QtQuick builds, as cura depends on PyQt6.QtQuick.

@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from 0ae96cc to 6048d60 Compare August 14, 2022 22:30
@LunNova LunNova changed the title cura: 4.12.1 -> 5.1.0 PyQt6: init at 6.3.1 Aug 14, 2022
@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from 6048d60 to e7a8661 Compare August 14, 2022 22:30
@LunNova LunNova marked this pull request as ready for review August 14, 2022 22:30
@LunNova LunNova mentioned this pull request Aug 14, 2022
2 tasks
@LunNova LunNova force-pushed the lunnova/cura-upgrade branch 2 times, most recently from 4ba306f to 8a68740 Compare August 15, 2022 00:09
@LunNova
Copy link
Member Author

LunNova commented Aug 15, 2022

This is ready to go now. Review run:

5 packages added:
hook python310Packages.pyqt6 (init at 6.3.1) python310Packages.pyqt6-sip (init at 13.4.0) python39Packages.pyqt6 (init at 6.3.1) python39Packages.pyqt6-sip (init at 13.4.0)

45 packages updated:
beamerpresenter cutemaze fcitx5-chinese-addons fcitx5-configtool fcitx5-qt fcitx5-qt fcitx5-qt fcitx5-unikey fcitx5-with-addons jami-client-qt mozillavpn qt3d qt5compat qtbase qtcharts qtconnectivity qtdatavis3d qtdeclarative qtdoc qtimageformats qtlanguageserver qtlottie qtmultimedia qtnetworkauth qtpositioning qtquick3d qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtsvg qttools qttranslations qtvirtualkeyboard qtwayland qtwebchannel qtwebengine qtwebsockets qtwebview quazip telegram-desktop zint

2 packages marked as broken and skipped:
libsForQt512.fcitx5-qt libsForQt514.fcitx5-qt

48 packages built:
beamerpresenter cutemaze fcitx5-chinese-addons fcitx5-configtool fcitx5-unikey fcitx5-with-addons jami-client-qt libsForQt5.fcitx5-qt mozillavpn python310Packages.pyqt6 python310Packages.pyqt6-sip python39Packages.pyqt6 python39Packages.pyqt6-sip qt6.qmake qt6.qt3d qt6.qt5compat qt6.qtbase qt6.qtcharts qt6.qtconnectivity qt6.qtdatavis3d qt6.qtdeclarative qt6.qtdoc qt6.qtimageformats qt6.qtlanguageserver qt6.qtlottie qt6.qtmultimedia qt6.qtnetworkauth qt6.qtpositioning qt6.qtquick3d qt6.qtquicktimeline qt6.qtremoteobjects qt6.qtscxml qt6.qtsensors qt6.qtserialbus qt6.qtserialport qt6.qtshadertools qt6.qtsvg qt6.qttools qt6.qttranslations qt6.qtvirtualkeyboard qt6.qtwayland qt6.qtwebchannel qt6.qtwebengine qt6.qtwebsockets qt6.qtwebview qt6Packages.quazip tdesktop zint

Also got this during the review - might be an issue with the setup hook trying to run qmake for the nixpkgs-review shell? Not sure if this is actually a problem - it should try to run qmake if it's loaded, and nixpkgs-review is trying to include it, it's just that it doesn't make sense in this context.

$ nix --experimental-features nix-command build --no-link --keep-going --option build-use-sandbox relaxed -f /home/lun/.cache/nixpkgs-review/rev-8a68740f87138cd899e253c8fac9e0fcf6ac7e0e/build.nix
error: builder for '/nix/store/s1c06za276flpvkqrsl2kj78hkxlcr99-review-shell.drv' failed with exit code 1;
       last 10 log lines:
       >   -set <prop> <value> Set persistent property
       >   -unset <prop>  Unset persistent property
       >   -query <prop>  Query persistent property. Show all if <prop> is empty.
       >   -qtconf file   Use file instead of looking for qt6.conf, then qt.conf
       >   -cache file    Use file as cache           [makefile mode only]
       >   -spec spec     Use spec as QMAKESPEC       [makefile mode only]
       >   -nocache       Don't use a cache file      [makefile mode only]
       >   -nodepend      Don't generate dependencies [makefile mode only]
       >   -nomoc         Don't generate moc targets  [makefile mode only]
       >   -nopwd         Don't look for files in pwd [project mode only]
       For full logs, run 'nix log /nix/store/s1c06za276flpvkqrsl2kj78hkxlcr99-review-shell.drv'.

pkgs/development/libraries/qt-6/hooks/qmake-hook.sh Outdated Show resolved Hide resolved
Comment on lines +8 to +9
- if (!project->values("QMAKE_DEFAULT_INCDIRS").contains(includeDir))
- t << "-I${includedir}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the QMAKE_DEFAULT_INCDIRS, shouldn't they be included by default rendering the added -I flag useless.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as #52457

pkgs/development/python-modules/pyqt/6.x.nix Outdated Show resolved Hide resolved
Comment on lines 65 to 84
qtbase
qtsvg
qtdeclarative
qtwebchannel
qmake
qtquick3d
qtquicktimeline
]
++ lib.optional withConnectivity qtconnectivity
++ lib.optional withMultimedia qtmultimedia
++ lib.optional withWebKit qtwebkit
++ lib.optional withWebSockets qtwebsockets
++ lib.optional withLocation qtlocation
;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't specifying them once in buildInputs enough?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's correct the way it is.

The Qt module deps for PyQt6 have things needed both on the native platform and on the destination platform, as at build time it needs to look through the specs in the dev output to generate code.

The 5.x version of this package does the same thing.

Example output when not using nativeBuildInputs:

python3.10-PyQt6>   /nix/store/f5hlylpngpc59nnh6knxn70g20p0vhza-qtbase-6.3.1-dev/bin/qmake QtQml.pro
python3.10-PyQt6>   Info: creating stash file /build/tmpemfmvvwj/cfgtest_QtQml/.qmake.stash
python3.10-PyQt6>   Project ERROR: Unknown module(s) in QT: qml

@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from 8a68740 to 75d9478 Compare August 16, 2022 00:32
@ofborg ofborg bot requested a review from NickCao August 16, 2022 00:40
@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from 75d9478 to 483a021 Compare August 16, 2022 00:52
@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from 483a021 to 5fd3e6a Compare August 17, 2022 05:27
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/1123

pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh Outdated Show resolved Hide resolved
pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh Outdated Show resolved Hide resolved
pkgs/development/libraries/qt-6/modules/qtbase.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/qt-6/qtModule.nix Outdated Show resolved Hide resolved
fi

if [[ -z "$dontSyncQt" && -f sync.profile ]]; then
${self.qtbase.dev}/libexec/syncqt.pl -version "''${version%%-*}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go to nativeBuildInputs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add it there but it still won't be on PATH as it's using something from libexec not bin.

Should it be in both places? Done that for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having it in both places makes no difference. For cross compiling it needs to be in nativeBuildInputs or use some variant of buildPackages which I am not very familiar with.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to fix it then :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put a FIXME here since I still don't know how to fix this and having it work at all is probably more important than cross compilation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkgs/development/python-modules/pyqt/pyqt6-sip.nix Outdated Show resolved Hide resolved
Comment on lines 13 to 17
, withConnectivity ? false
, withMultimedia ? false
, withWebKit ? false
, withWebSockets ? false
, withLocation ? false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is highly problematic in python packages. Is pyqt6 used in propagatedBuildInputs? If so we need to run on all options by default and best remove them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be, can remove the options.

Do I need to remove them from the 5.x package?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like have to keep withWebEngine off by default - see the 5.x version:

image

Copy link
Member

@SuperSandro2000 SuperSandro2000 Aug 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need to remove them from the 5.x package?

Thats a topic for another PR.

Looks like have to keep withWebEngine off by default - see the 5.x version:

The comment is only there because of the issue I described earlier. Also only adding a comment is not that great because it can be easily missed when using the package or in a review.

Copy link

@nrdxp nrdxp Sep 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why exactly is this problematic? Building with webengine by default may be a bit overkill for applications that don't need it, as webengine is a pretty heavy dependency both build time wise, and on disk.

Also, when I packaged it, I put pyqt6-webengine in it's own package. It also has it's own source, so are you sure this even works? (I don't see you pulling the seperate pyqt-webengine source anywhere).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the ones that work to true, added comments otherwise.

pkgs/development/python-modules/pyqt/6.x.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pyqt/6.x.nix Outdated Show resolved Hide resolved
@LunNova
Copy link
Member Author

LunNova commented Aug 20, 2022

@SuperSandro2000 most of the issues you've raised fit the existing PyQt5 package / Qt5 hooks that this was based on.

Should I apply your suggested changes to the existing code too?

@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from 5fd3e6a to 6d43b1e Compare August 20, 2022 23:40
@LunNova
Copy link
Member Author

LunNova commented Aug 20, 2022

Ran nixpkgs-fmt on every file that's mostly new in this PR, haven't fixed the original files I copied from in master.

@SuperSandro2000
Copy link
Member

Should I apply your suggested changes to the existing code too?

Lets do that in another PR.


Also for easier rebasing I would recommend to use gits fixup! style commits generated by the fixup argument.

@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from 3771a86 to 6b22a0c Compare August 21, 2022 00:55
@LunNova LunNova mentioned this pull request Aug 31, 2022
16 tasks
@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from 6b22a0c to 86a6f0a Compare September 19, 2022 00:25
@LunNova LunNova force-pushed the lunnova/cura-upgrade branch 2 times, most recently from 2e07fcd to 9205665 Compare September 28, 2022 18:59
@LunNova LunNova mentioned this pull request Sep 29, 2022
13 tasks
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/1218

@SFrijters
Copy link
Member

FWIW, I just implemented an update to maestral-qt 1.6.3 (which requires PyQt6) on top of this PR and it seems to work!
SFrijters@a70b958

Thanks for being persistent in getting this PR merged - I don't know if it's clean enough yet to satisfy everyone, but I will be happy to see it available.

@nrdxp
Copy link

nrdxp commented Oct 6, 2022

@LunNova, it seems this PR now has some conflicts. If you can address those, and maybe bump to 6.4 which is now in master, then I'd be happy to merge this.

@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from 9205665 to fb013a1 Compare October 6, 2022 04:51
"-DQT_INSTALL_PREFIX=${placeholder "out"}"
];
postPatch = ''
# TODO: Remove after 6.4
Copy link
Member Author

@LunNova LunNova Oct 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Need to check these can be safely dropped now

@LunNova LunNova changed the title PyQt6: init at 6.3.1 PyQt6: init at 6.4.0 Oct 6, 2022
@LunNova LunNova force-pushed the lunnova/cura-upgrade branch from fb013a1 to 1824a12 Compare October 6, 2022 05:09
@LunNova
Copy link
Member Author

LunNova commented Oct 6, 2022

Hopefully it's good to go now, rebased and bumped to 6.4.0.

Haven't tested it much, don't have much time today.

@nrdxp
Copy link

nrdxp commented Oct 6, 2022

Result of nixpkgs-review pr 186689 run on x86_64-linux 1

2 packages marked as broken and skipped:
  • libsForQt512.fcitx5-qt
  • libsForQt514.fcitx5-qt
58 packages built:
  • beamerpresenter (beamerpresenter-mupdf)
  • beamerpresenter-poppler
  • cudaPackages.nsight_compute
  • cutemaze
  • fcitx5-chinese-addons
  • fcitx5-configtool
  • fcitx5-unikey
  • fcitx5-with-addons
  • jami-client-qt
  • ladybird
  • libsForQt5.fcitx5-qt (libsForQt515.fcitx5-qt ,plasma5Packages.fcitx5-qt)
  • libsForQt5_openssl_1_1.fcitx5-qt
  • mozillavpn
  • python310Packages.pyqt6
  • python310Packages.pyqt6-sip
  • python39Packages.pyqt6
  • python39Packages.pyqt6-sip
  • qt6.qmake (qt6Packages.qmake)
  • qt6.qt3d (qt6Packages.qt3d)
  • qt6.qt5compat (qt6Packages.qt5compat)
  • qt6.qtbase (qt6Packages.qtbase)
  • qt6.qtcharts (qt6Packages.qtcharts)
  • qt6.qtconnectivity (qt6Packages.qtconnectivity)
  • qt6.qtdatavis3d (qt6Packages.qtdatavis3d)
  • qt6.qtdeclarative (qt6Packages.qtdeclarative)
  • qt6.qtdoc (qt6Packages.qtdoc)
  • qt6.qthttpserver (qt6Packages.qthttpserver)
  • qt6.qtimageformats (qt6Packages.qtimageformats)
  • qt6.qtlanguageserver (qt6Packages.qtlanguageserver)
  • qt6.qtlottie (qt6Packages.qtlottie)
  • qt6.qtmultimedia (qt6Packages.qtmultimedia)
  • qt6.qtnetworkauth (qt6Packages.qtnetworkauth)
  • qt6.qtpositioning (qt6Packages.qtpositioning)
  • qt6.qtquick3d (qt6Packages.qtquick3d)
  • qt6.qtquick3dphysics (qt6Packages.qtquick3dphysics)
  • qt6.qtquicktimeline (qt6Packages.qtquicktimeline)
  • qt6.qtremoteobjects (qt6Packages.qtremoteobjects)
  • qt6.qtscxml (qt6Packages.qtscxml)
  • qt6.qtsensors (qt6Packages.qtsensors)
  • qt6.qtserialbus (qt6Packages.qtserialbus)
  • qt6.qtserialport (qt6Packages.qtserialport)
  • qt6.qtshadertools (qt6Packages.qtshadertools)
  • qt6.qtspeech (qt6Packages.qtspeech)
  • qt6.qtsvg (qt6Packages.qtsvg)
  • qt6.qttools (qt6Packages.qttools)
  • qt6.qttranslations (qt6Packages.qttranslations)
  • qt6.qtvirtualkeyboard (qt6Packages.qtvirtualkeyboard)
  • qt6.qtwayland (qt6Packages.qtwayland)
  • qt6.qtwebchannel (qt6Packages.qtwebchannel)
  • qt6.qtwebengine (qt6Packages.qtwebengine)
  • qt6.qtwebsockets (qt6Packages.qtwebsockets)
  • qt6.qtwebview (qt6Packages.qtwebview)
  • qt6.wrapQtAppsHook (qt6Packages.wrapQtAppsHook)
  • qt6Packages.kcoreaddons
  • qt6Packages.poppler
  • qt6Packages.quazip
  • tdesktop
  • zint

Copy link

@nrdxp nrdxp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the effort here. Based on my run of nixpkgs-review it looks like we are clear to merge.

@nrdxp nrdxp merged commit 2d387fb into NixOS:master Oct 6, 2022
@LunNova LunNova deleted the lunnova/cura-upgrade branch October 6, 2022 21:55
@SFrijters SFrijters mentioned this pull request Oct 6, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

qt6.qtbase: Could not find qmake spec 'linux-g++'
6 participants