Skip to content

telegram-desktop: always wrap with wrapGAppsHook3#357973

Open
NickCao wants to merge 1 commit intoNixOS:masterfrom
NickCao:telegram-desktop-wrap
Open

telegram-desktop: always wrap with wrapGAppsHook3#357973
NickCao wants to merge 1 commit intoNixOS:masterfrom
NickCao:telegram-desktop-wrap

Conversation

@NickCao
Copy link
Member

@NickCao NickCao commented Nov 21, 2024

Required for invoking the file selector

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

Required for invoking the file selector
@tpwrules
Copy link
Contributor

Is there a way to globally do this? So many programs require this little hack and it's annoying to have to merge a PR for each one.

@NickCao
Copy link
Member Author

NickCao commented Nov 21, 2024

Is there a way to globally do this?

That would negate the whole point of using nix: packages shouldn't require something to be installed globally.

So many programs require this little hack and it's annoying to have to merge a PR for each one.

Most of the programs are properly wrapped, this one was missed out during the last refactoring.

@tpwrules
Copy link
Contributor

Sorry, I meant something like patching Glib or whichever library to have a default schema path, not a global install by the user or NixOS.

And I've personally had to file several, maybe the situation is better these days, but it seems there's always One More. Do you have a link to that refactoring?

@NickCao
Copy link
Member Author

NickCao commented Nov 21, 2024

Sorry, I meant something like patching Glib or whichever library to have a default schema path, not a global install by the user or NixOS.

Ah, that sounds good! CC @jtojnar @bobby285271 for inputs.

And I've personally had to file several, maybe the situation is better these days, but it seems there's always One More. Do you have a link to that refactoring?

I'm referring to telegram-desktop refactoring: #353524

@jtojnar
Copy link
Member

jtojnar commented Nov 21, 2024

Ah, that sounds good! CC @jtojnar @bobby285271 for inputs.

See #271037. We still need to finish it up and do some testing.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 22, 2024
@NickCao NickCao requested a review from ilya-fedin November 22, 2024 16:15
@ilya-fedin
Copy link
Contributor

That's wrong. The file selector is driven by QFileDialog. If this happens to tdesktop, this should happen to any other Qt application on the same system.

@jtojnar
Copy link
Member

jtojnar commented Nov 22, 2024

It does happen to any other Qt application on the same system.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 22, 2024

I mean, why tdesktop is treated special here? Shouldn't this be done to Qt, QGnomePlatform or wrapQtAppsHook instead?

@NickCao
Copy link
Member Author

NickCao commented Nov 22, 2024

That's wrong. The file selector is driven by QFileDialog. If this happens to tdesktop, this should happen to any other Qt application on the same system.

Oh this is on me, I'm forcing qt to use the gtk file selector by setting QT_QPA_PLATFORMTHEME to gtk3.

@jtojnar
Copy link
Member

jtojnar commented Nov 22, 2024

I mean, why tdesktop is treated special here?

It is not, other Qt apps are getting this treatment as well. Probably because it is not clear how to fix this properly so this hack tends spread.

Shouldn't this be done to Qt, QGnomePlatform or wrapQtAppsHook instead?

🤷‍♀️

@ilya-fedin
Copy link
Contributor

It is not, other Qt apps are getting this treatment as well. Probably because it is not clear how to fix this properly so this hack tends spread.

Ah, ok

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 23, 2024
@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 25, 2025
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 1, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 1, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants