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

lomiri.lomiri-ui-toolkit: init at 1.3.5011 #241717

Merged
merged 5 commits into from
Dec 10, 2023

Conversation

OPNA2608
Copy link
Contributor

@OPNA2608 OPNA2608 commented Jul 5, 2023

Description of changes

Working towards #99090.

Lomiri UI Toolkit, QML components to ease the creation of beautiful applications in QML for Lomiri. Required by most Lomiri core applications.

  • The test suite has many errors still.
    It more or less passes now, but we need to disable a large amount of tests because they expect a working Qt OpenGL context, which our sandbox doesn't provide.
  • The gettext-based localisation is broken. Partly.
    It has some solution now, by looking in /run/current-system/sw/share/locale. Not great, but should make those edge cases work without intensive patching.
  • I think the QMake-generated pkg-config files can be fixed without patching them up afterwards, I'm sure there are variables to override the wrong paths in them ahead of time
    Partly solved. There are variables to control the paths, but some of them get overwritten by the Qt modules they use.
  • Cleanup 🙂
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/)
  • 23.11 Release Notes (or backporting 23.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
  • Fits CONTRIBUTING.md.

@OPNA2608 OPNA2608 force-pushed the init/lomiri/lomiri-ui-toolkit branch from faa5f71 to 83f736a Compare July 6, 2023 07:09
@OPNA2608 OPNA2608 force-pushed the init/lomiri/lomiri-ui-toolkit branch from 7de2caf to 31004ed Compare July 25, 2023 09:45
@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Jul 27, 2023

I've cleaned stuff up a tiny bit by playing around with the tests and commented some stuff. The huge amount of disabled tests likely needs to stay - I've checked them all in a less-pure nix-shell from my graphical session and all the ones with the OpenGL context error and signal spy misses seem to work there.

I think this is more or less ready. I will "backport" the changes I've made since the first commit to my big Lomiri branch to test that it doesn't break stuff too much (the localisation one might need some changes, but it'll work abit better than before), then squash away all the commits and mark it ready.

@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Jul 27, 2023

Works in theory (lomiri-gallery-app), though not in some applications? I'll look into that on a per-application basis I guess. Edit: Those are application-specific bugs, the system works when it's being used properly.
image

@OPNA2608 OPNA2608 force-pushed the init/lomiri/lomiri-ui-toolkit branch from 27cc9ca to 06aa367 Compare July 27, 2023 18:19
@OPNA2608 OPNA2608 changed the title WIP lomiri.lomiri-ui-toolkit: init at 1.3.5010 lomiri.lomiri-ui-toolkit: init at 1.3.5010 Jul 27, 2023
@OPNA2608 OPNA2608 marked this pull request as ready for review July 27, 2023 19:06
@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/2498

@Janik-Haag
Copy link
Member

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

2 packages built:
  • lomiri.lomiri-ui-toolkit
  • lomiri.lomiri-ui-toolkit.dev

Copy link
Member

@Janik-Haag Janik-Haag left a comment

Choose a reason for hiding this comment

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

Uh wow that's a lot, first of all thank you for your amazing work!
I tired reviewing it but I'm not at all familiar with lomiri and the ecosystem around it, and hope the comments help. I would encourage you asking some one else to also review this, maybe some one that is also familiar with the prior art because I don't really feel comfortable merging this because of lack of knowledge and sadly won't have time to get deeply involved.

Comment on lines +90 to +110
# Using /run/current-system/sw/share/locale instead of /usr/share/locale isn't a great
# solution, but at least it should get us working localisations
substituteInPlace src/LomiriToolkit/i18n.cpp \
--replace "/usr" "/run/current-system/sw"
Copy link
Member

Choose a reason for hiding this comment

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

do you know how other desktop environments on nixos handle this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Closest functional & situational equivalent in a similar DE seems to be ki18n for KDE, it uses a less-hardcoded way of finding a matching locale prefix? Assuming it works for KDE (haven't tried), I can try to port its method to LUITK and see if that improves things.

Otherwise, our Cinnamon DE packaging also patches such hardcoded locale dirs to /run/current-system/sw/share/locale.

Copy link
Contributor Author

@OPNA2608 OPNA2608 Oct 18, 2023

Choose a reason for hiding this comment

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

0001-LomiriToolkit-i18n-Locate-locale-via-QStandardPaths-.patch.txt is a quick attempt at porting the ki18n way of doing this to LUITK. I think it should work, but it'll need a setup hook like in ECM to bring the paths of QML dependencies into XDG_DATA_DIRS (worst case, /run/current-system/sw/share is already in there so it would be on-par with current submission), and I'm not sure this is acceptable for upstream as-is.

There might also be an existing-but-seemingly-underused way of making sure the domains are properly bound which might be lower-maintenance, but I haven't played around with that yet.

This is definitely doable, but I'll lack the free time to properly finish this up with proper testing of everything, setup hooks & upstreaming now that new university semester has started. I hope the current submission is flawed but good enough for now.

Edit: I've written a note about this on the Lomiri tracking issue, so we don't forget this issue down the road.

pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix Outdated Show resolved Hide resolved
pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix Outdated Show resolved Hide resolved
pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix Outdated Show resolved Hide resolved
pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix Outdated Show resolved Hide resolved
@OPNA2608 OPNA2608 force-pushed the init/lomiri/lomiri-ui-toolkit branch from b4674ca to ad6fe19 Compare October 15, 2023 11:50
@OPNA2608
Copy link
Contributor Author

Comments adjusted based on feedback. New version has been released today, including the bump.

@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-already-reviewed/2617/1197

@OPNA2608 OPNA2608 marked this pull request as draft November 15, 2023 23:07
@OPNA2608 OPNA2608 force-pushed the init/lomiri/lomiri-ui-toolkit branch from be8dbde to 6706fd5 Compare November 17, 2023 15:22
@OPNA2608 OPNA2608 force-pushed the init/lomiri/lomiri-ui-toolkit branch 2 times, most recently from c46caae to 8c08179 Compare November 18, 2023 17:33
@OPNA2608 OPNA2608 marked this pull request as ready for review November 18, 2023 18:58
@OPNA2608 OPNA2608 force-pushed the init/lomiri/lomiri-ui-toolkit branch from 8c08179 to c7b1373 Compare November 21, 2023 10:47
@OPNA2608
Copy link
Contributor Author

@wineee Could I bother you for a re-review / ACK of the changes? I submitted some of the distro-agnostic fixes from here to upstream which we now fetchpatch, and added a fix for compatibility with the recent Qt 5.15.11 bump.

@wineee
Copy link
Member

wineee commented Nov 24, 2023

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

3 packages built:
  • lomiri.lomiri-ui-toolkit
  • lomiri.lomiri-ui-toolkit.dev
  • lomiri.suru-icon-theme

qtfeedback
qtgraphicaleffects
qtsvg
qtwayland
Copy link
Member

@wineee wineee Nov 24, 2023

Choose a reason for hiding this comment

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

How to confirm these need propagate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • feedback & graphicaleffects should show up when you grep the installed qml files for import statements. they're propagated so individual applications don't need to figure out via trial-and-error which modules they depend upon also happen to require feedback / graphicaleffects
  • svg... i don't remember, been too long 🙁. i think for svg icon format support? Can try to check.
  • wayland so all applications using the toolkit work on wayland, outside of Lomiri

Copy link
Member

@wineee wineee Nov 24, 2023

Choose a reason for hiding this comment

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

wrapQtAppsHook will propagate qtwayland in linux

name = "wrap-qt5-apps-hook";
propagatedBuildInputs = [ qtbase.dev makeBinaryWrapper ]
++ lib.optional stdenv.isLinux qtwayland.dev;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it may have fixed usage of lomiri.propagatedBuildInputs for pre-check setup in some reverse dependencies actually… ehh. Building lomiri-terminal-app without re-propagated qtwayland produces wrapping that looks identical so you're right. I'm sure if whatever that was fixing comes up again, I'll notice it again. 🙂

Copy link
Member

@wineee wineee left a comment

Choose a reason for hiding this comment

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

LGTM

@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Dec 3, 2023

Rebased to resolve merge conflict.

@OPNA2608 OPNA2608 force-pushed the init/lomiri/lomiri-ui-toolkit branch from 565b3e3 to 55af414 Compare December 9, 2023 19:23
@Janik-Haag
Copy link
Member

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

3 packages built:
  • lomiri.lomiri-ui-toolkit
  • lomiri.lomiri-ui-toolkit.dev
  • lomiri.suru-icon-theme

Copy link
Member

@Janik-Haag Janik-Haag left a comment

Choose a reason for hiding this comment

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

LGTM

@Janik-Haag Janik-Haag merged commit b81737e into NixOS:master Dec 10, 2023
21 of 22 checks passed
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.

4 participants