Skip to content

discord: add libglvnd and fix electron flags#202352

Merged
SuperSandro2000 merged 1 commit intoNixOS:masterfrom
fufexan:discord
Dec 13, 2022
Merged

discord: add libglvnd and fix electron flags#202352
SuperSandro2000 merged 1 commit intoNixOS:masterfrom
fufexan:discord

Conversation

@fufexan
Copy link
Contributor

@fufexan fufexan commented Nov 22, 2022

Description of changes

Fixes Discord Canary not launching in Wayland mode when NIXOS_OZONE_WL=1 is set (broken in #192659), and errors such as

[2946:1122/160729.555518:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory
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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@fufexan fufexan requested review from Artturin, devins2518 and thiagokokada and removed request for thiagokokada November 22, 2022 14:18
@ofborg ofborg bot requested review from Infinidoge and MP2E November 22, 2022 14:21
@ofborg ofborg 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. labels Nov 22, 2022
@SuperSamus
Copy link
Contributor

Is it related to the issue #159267?

@fufexan
Copy link
Contributor Author

fufexan commented Nov 22, 2022

Not entirely sure, I didn't have a black screen before.

@Artturin
Copy link
Member

i can't reproduce the issue on my amd gpu but there's some vendored libraries in opt/DiscordCanary

$ pwd
/nix/store/k1kcpdbqk7h9ssg2pqsvzc432g1wy2qf-discord-canary-0.0.143/opt/DiscordCanary
$ ls *.so
 libEGL.so   libffmpeg.so   libGLESv2.so   libvk_swiftshader.so

Copy link
Contributor

@Infinidoge Infinidoge left a comment

Choose a reason for hiding this comment

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

Unfortunately I do not currently have a Wayland setup, so I cannot (and have not) personally tested this to see if this actually fixes that issue. However, the code changes look good to me, and it runs properly under X11. I also didn't see any cannot open shared object file errors.

@fufexan
Copy link
Contributor Author

fufexan commented Nov 23, 2022

i can't reproduce the issue on my amd gpu but there's some vendored libraries in opt/DiscordCanary

$ pwd
/nix/store/k1kcpdbqk7h9ssg2pqsvzc432g1wy2qf-discord-canary-0.0.143/opt/DiscordCanary
$ ls *.so
 libEGL.so   libffmpeg.so   libGLESv2.so   libvk_swiftshader.so

I've tested again and it seems that it only fails to find those libs when building with OpenASAR.

However the Wayland --ozone-platform is wrong either way, and works using this PR.

@fufexan
Copy link
Contributor Author

fufexan commented Nov 28, 2022

@Artturin does my comment above address your question? Should we look for alternatives?

@mweinelt mweinelt added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 3, 2022
@SuperSandro2000 SuperSandro2000 merged commit 09faac4 into NixOS:master Dec 13, 2022
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. 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.

6 participants