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

telegram-desktop: port derivation improvements from kotatogram-desktop #352359

Merged
merged 18 commits into from
Nov 2, 2024

Conversation

ilya-fedin
Copy link
Contributor

@ilya-fedin ilya-fedin commented Oct 30, 2024

This backports various improvements made in kotatogram-desktop derivation, such as actualizing specified dependencies and rebases kotatogram-desktop on top of telegram-desktop override.

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@ilya-fedin
Copy link
Contributor Author

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

1 package failed to build:
  • materialgram
5 packages built:
  • _64gram
  • kotatogram-desktop
  • kotatogram-desktop-with-webkit
  • telegram-desktop
  • telegram-desktop-with-webkit

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Oct 30, 2024
@ofborg ofborg bot requested a review from NickCao October 30, 2024 16:55
@ilya-fedin ilya-fedin force-pushed the telegram-desktop-cleanup branch from 50dcc38 to 5a0175b Compare October 31, 2024 11:53
@ilya-fedin
Copy link
Contributor Author

@NickCao would be nice if you give a review, I want to get this sooner to start working on rebasing telegram and kotatogram to the new macOS SDK handling before branch off so 24.11 includes all the features currently commented in macos.patch.

@ilya-fedin ilya-fedin force-pushed the telegram-desktop-cleanup branch 4 times, most recently from df417ae to 39090b8 Compare October 31, 2024 13:13
@NickCao
Copy link
Member

NickCao commented Oct 31, 2024

Wow I thought of making webkitgtk optional for a long time, thanks for doing that!

@ilya-fedin ilya-fedin force-pushed the telegram-desktop-cleanup branch 3 times, most recently from 73c1068 to 3e5892b Compare October 31, 2024 21:15
@ilya-fedin ilya-fedin force-pushed the telegram-desktop-cleanup branch from 3e5892b to 91ae91a Compare October 31, 2024 22:07
@ofborg ofborg bot requested a review from NickCao November 1, 2024 04:36
@NickCao
Copy link
Member

NickCao commented Nov 1, 2024

kotatogram-desktop build is failing on ofborg.

@ilya-fedin
Copy link
Contributor Author

Yeah, it fails on master since staging-next got merged...

@ilya-fedin ilya-fedin force-pushed the telegram-desktop-cleanup branch from 91ae91a to fb3593a Compare November 1, 2024 13:55
@ilya-fedin ilya-fedin force-pushed the telegram-desktop-cleanup branch from fb3593a to b6de85c Compare November 1, 2024 13:57
@ilya-fedin
Copy link
Contributor Author

Should build now

@NickCao
Copy link
Member

NickCao commented Nov 1, 2024

@ofborg build telegram-desktop

@NickCao
Copy link
Member

NickCao commented Nov 1, 2024

@ofborg build kotatogram-desktop

@NickCao
Copy link
Member

NickCao commented Nov 1, 2024

Also: I'd intend to merge this after 24.11 branch off.

@ilya-fedin
Copy link
Contributor Author

but why? 🤔

@NickCao
Copy link
Member

NickCao commented Nov 1, 2024

but why? 🤔

Because this is very much a breaking change? (Well I might not even able to convince myself on this one, since webkitgtk integration has been broken from time to time)

@ilya-fedin ilya-fedin force-pushed the telegram-desktop-cleanup branch from ee10cfb to 061b2fa Compare November 1, 2024 16:01
@ilya-fedin
Copy link
Contributor Author

Ok, added a toggle to build without webkitgtk so that just kotatogram can continue to use the wrapper

@ilya-fedin ilya-fedin force-pushed the telegram-desktop-cleanup branch from 061b2fa to 271e701 Compare November 1, 2024 16:38
@ilya-fedin
Copy link
Contributor Author

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

1 package failed to build:
  • materialgram
4 packages built:
  • _64gram
  • kotatogram-desktop
  • kotatogram-desktop-with-webkit
  • telegram-desktop

Copy link
Member

@NickCao NickCao left a comment

Choose a reason for hiding this comment

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

diff LGTM, materialgram already failing on master.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 1, 2024
@ofborg ofborg bot requested a review from NickCao November 2, 2024 01:26
@wegank wegank added the 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package label Nov 2, 2024
Quite a lot of current dependencies are not used by the application while some new optional dependencies are missing leading to subpar UX
Quite a lot of current dependencies are not used by the library while some new optional dependencies are missing leadin
g to subpar UX

This also makes all dependencies propagated as that is logical for a static library
@ilya-fedin ilya-fedin force-pushed the telegram-desktop-cleanup branch from 271e701 to 87e3f9d Compare November 2, 2024 18:07
@ilya-fedin
Copy link
Contributor Author

ilya-fedin commented Nov 2, 2024

LIBGL_ALWAYS_SOFTWARE=1 WEBKIT_DISABLE_DMABUF_RENDERER=1 QT_QPA_PLATFORM=xcb nix run .#telegram-desktop

Perhaps I need first two env vars due to mixing master's mesa with unstable system

@wegank wegank removed 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Nov 2, 2024
Copy link
Member

@NickCao NickCao left a comment

Choose a reason for hiding this comment

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

Tested basic functionality.

@NickCao NickCao merged commit 8191672 into NixOS:master Nov 2, 2024
10 of 11 checks passed
@ilya-fedin ilya-fedin deleted the telegram-desktop-cleanup branch November 2, 2024 19:23
@ilya-fedin
Copy link
Contributor Author

ilya-fedin commented Nov 2, 2024

@clot27 btw, I have contacted 64gram developer, you should be able to get rid of the patch and cmake flags in your override soon

@ilya-fedin
Copy link
Contributor Author

@NickCao is there still any sense to port the webkit wrapper to telegram--desktop or is the withWebKitGTK build option enough?

@NickCao
Copy link
Member

NickCao commented Nov 2, 2024

@NickCao is there still any sense to port the webkit wrapper to telegram--desktop or is the withWebKitGTK build option enough?

There still is, I'd say most of the users can't care less about webkit and making that optional can be beneficial.

@ilya-fedin
Copy link
Contributor Author

ilya-fedin commented Nov 2, 2024

I mean you can now add something like that to all-packages.nix:

  telegram-desktop-without-webkitgtk = (telegram-desktop.override {
    withWebKitGTK = false;
  }).overrideAttrs(oldAttrs: {
    meta = oldAttrs.meta // { platforms = lib.platforms.linux };
  });

And the only (practical) difference to the wrapper will be that Hydra will build telegram-desktop two times for Linux. idk how big telegram-desktop is for Hydra, maybe there's no practical need in the additional wrapper and that's enough.

@NickCao
Copy link
Member

NickCao commented Nov 2, 2024

telegram-desktop is certainly on the medium-large side, thus I'm in favor of the wrapper approach, just not that satisfied with the current implementation.

@ilya-fedin
Copy link
Contributor Author

ok, here's it: #353243

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.

5 participants