fix(discord): only add opengl paths to nvidia pc
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-02-27 17:23:48 -05:00
parent 8a3dad89b4
commit 51e6afac23

View file

@ -1,9 +1,12 @@
{ {
config, config,
lib,
pkgs, pkgs,
... ...
}: let }: let
inherit (config.vars) mainUser; inherit (config.vars) mainUser;
isNvidia = config.hardware.nvidia.modesetting.enable;
in { in {
imports = [../dolphin.nix]; imports = [../dolphin.nix];
@ -58,10 +61,11 @@ in {
]; ];
buildInputs = [makeWrapper]; buildInputs = [makeWrapper];
postBuild = '' postBuild = ''
wrapProgram $out/bin/Discord --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ wrapProgram $out/bin/Discord ${lib.optionalString isNvidia
addOpenGLRunpath.driverLink ''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
libglvnd addOpenGLRunpath.driverLink
]}" \ libglvnd
]}"''} \
--add-flags "--enable-features=UseOzonePlatform --ozone-platform=wayland" --add-flags "--enable-features=UseOzonePlatform --ozone-platform=wayland"
''; '';
}) })