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