Skip to content

freecad: remove qt5 and explicit wayland builds#416741

Merged
pbsds merged 3 commits intoNixOS:masterfrom
LordGrimmauld:freecad-qt
Jun 15, 2025
Merged

freecad: remove qt5 and explicit wayland builds#416741
pbsds merged 3 commits intoNixOS:masterfrom
LordGrimmauld:freecad-qt

Conversation

@LordGrimmauld
Copy link
Contributor

Qt5 support is was officially reduced by qt [1].

FreeCAD supports both Qt5 and Qt6. While their github
build still uses Qt5, the official flatpak uses Qt6 [2].

Additionally, keeping Qt5 support requires pinning
python to 3.12 or older, as shiboken2 would break.
Currently, this breakage is imminent: #412204 unpinned
python, with the next staging-next merge updating py to 3.13.

Qt will figure out which platform plugin to use. Many of our packages already explicitly unset QT_QPA_PLATFORM, it makes little sense to force it here.

[1] https://www.qt.io/blog/extended-security-maintenance-for-qt-5.15-begins-may-2025
[2] https://github.com/flathub/org.freecad.FreeCAD/blob/ad843adc0a29a2c78bdd60624376aab61445ed63/org.freecad.FreeCAD.yaml#L62

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (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
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

Qt5 support is was officially reduced by qt [1].

FreeCAD supports both Qt5 and Qt6. While their github
build still uses Qt5, the official flatpak uses Qt6 [2].

Additionally, keeping Qt5 support requires pinning
python to 3.12 or older, as shiboken2 would break.
Currently, this breakage is imminent: NixOS#412204 unpinned
python, with the next staging-next merge updating py to 3.13.

[1] https://www.qt.io/blog/extended-security-maintenance-for-qt-5.15-begins-may-2025
[2] https://github.com/flathub/org.freecad.FreeCAD/blob/ad843adc0a29a2c78bdd60624376aab61445ed63/org.freecad.FreeCAD.yaml#L62
Qt will figure out which platform plugin to use. Many of our packages already
explicitly unset `QT_QPA_PLATFORM`, it makes little sense to force it here.
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Jun 14, 2025
@LordGrimmauld
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 416741
Commit: 34a33ec1bf0e19457ac3f14c9e3932f840ab0093


x86_64-linux

✅ 1 package built:
  • freecad

@LordGrimmauld LordGrimmauld requested review from K900 and pbsds June 14, 2025 17:09
@LordGrimmauld
Copy link
Contributor Author

Hmm i might also be able to clean up the wrapping, this currently triple-wraps...

@LordGrimmauld
Copy link
Contributor Author

image
Alright, no more duplicate wrapping. Just running the passthru tests now to make sure i didn't accidentially break the python path, but i don't think i did.

@LordGrimmauld
Copy link
Contributor Author

Indeed passthru tests still work (which do check the python path)

@LordGrimmauld
Copy link
Contributor Author

(oops, misclick with the close...)

Comment on lines +130 to +136
"-DSHIBOKEN_INCLUDE_DIR=${python3Packages.shiboken6}/include"
"-DSHIBOKEN_LIBRARY=Shiboken6::libshiboken"
(
"-DPYSIDE_INCLUDE_DIR=${python3Packages.pyside6}/include"
+ ";${python3Packages.pyside6}/include/PySide6/QtCore"
+ ";${python3Packages.pyside6}/include/PySide6/QtWidgets"
+ ";${python3Packages.pyside6}/include/PySide6/QtGui"
Copy link
Member

Choose a reason for hiding this comment

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

lib.getInclude?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't actually append /include, it only would get the $include output. And pyside6 only has the one default output. So would not do anything.

@pbsbot
Copy link

pbsbot commented Jun 14, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 416741
Commit: d72cbf576f98d6756d08565166f9803ba28f0d59


x86_64-linux

✅ 1 package built:
  • freecad

@pbsds
Copy link
Member

pbsds commented Jun 14, 2025

The python wrapper usually also adds the /bin folders to PATH, are any of the pytohn dep entrypoints needed by freecad?

@LordGrimmauld
Copy link
Contributor Author

The python wrapper usually also adds the /bin folders to PATH, are any of the pytohn dep entrypoints needed by freecad?

The python wrapper wasn't even used before i think - even before it was just --prefix PYTHONPATH : "$PYTHONPATH" in the Qt wrapper, no explicit python wrapper statements. The environment should be basically the same. And i am still setting python path, just using nix instead of bash to do it (and avoiding double wrapping in the process)

@pbsds
Copy link
Member

pbsds commented Jun 15, 2025

Ah, my eyes skipped past the old qtWrapperArgs+=(...) in the diff, LGTM

@pbsds pbsds merged commit fccb2a5 into NixOS:master Jun 15, 2025
24 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants