-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
PyQt6: init at 6.4.0 #186689
Conversation
Almost working, PyQt6's QML bindings aren't building due to:
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. |
f78a3c0
to
0ae96cc
Compare
Need to fix finding the .so files for things outside of QtBase so QtQuick builds, as cura depends on |
0ae96cc
to
6048d60
Compare
6048d60
to
e7a8661
Compare
4ba306f
to
8a68740
Compare
This is ready to go now. Review run:
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.
|
- if (!project->values("QMAKE_DEFAULT_INCDIRS").contains(includeDir)) | ||
- t << "-I${includedir}"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as #52457
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 | ||
; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
8a68740
to
75d9478
Compare
75d9478
to
483a021
Compare
483a021
to
5fd3e6a
Compare
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 |
fi | ||
|
||
if [[ -z "$dontSyncQt" && -f sync.profile ]]; then | ||
${self.qtbase.dev}/libexec/syncqt.pl -version "''${version%%-*}" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :(
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
, withConnectivity ? false | ||
, withMultimedia ? false | ||
, withWebKit ? false | ||
, withWebSockets ? false | ||
, withLocation ? false |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
@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? |
5fd3e6a
to
6d43b1e
Compare
Ran nixpkgs-fmt on every file that's mostly new in this PR, haven't fixed the original files I copied from in master. |
Lets do that in another PR. Also for easier rebasing I would recommend to use gits |
3771a86
to
6b22a0c
Compare
6b22a0c
to
86a6f0a
Compare
2e07fcd
to
9205665
Compare
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 |
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! 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. |
@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. |
9205665
to
fb013a1
Compare
"-DQT_INSTALL_PREFIX=${placeholder "out"}" | ||
]; | ||
postPatch = '' | ||
# TODO: Remove after 6.4 |
There was a problem hiding this comment.
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
fb013a1
to
1824a12
Compare
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. |
Result of 2 packages marked as broken and skipped:
58 packages built:
|
There was a problem hiding this 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.
Description of changes
Fixes #186599
Replaces #177530, #174306, #175510
Also needed for #186570
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notescc @NickCao @ttuegel @milahu