summaryrefslogtreecommitdiff
path: root/overlay/discord.nix
blob: fa9d80518daf1568963f4f1aaf21c3c8b04a8436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
_: prev: let
  flags = "--enable-gpu-rasterization --enable-zero-copy --enable-gpu-compositing --enable-native-gpu-memory-buffers --enable-oop-rasterization --enable-features=UseSkiaRenderer,WaylandWindowDecorations";

  mkOverride = d: let
    # TODO: re-enable openASAR when gnome wayland decorations work with it
    d' = d; #.override {withOpenASAR = true;};
  in
    if prev.stdenv.isLinux
    then
      d'.overrideAttrs (old: {
        desktopItem = old.desktopItem.override (old': {
          exec = "${old'.exec} ${flags}";
        });
      })
    else d';
in {
  discord = mkOverride prev.discord;
  discord-canary = mkOverride prev.discord-canary;
}