{
  branch ? "canary",
  pkgs,
  base ? ./discord-base.nix,
  deviceScaleFactor ? 1,
  withOpenASAR ? true,
}:
# Generated by /maintainers/scripts/update-discord
let
  inherit (pkgs) callPackage fetchurl;
in
{
  stable = callPackage base rec {
    inherit deviceScaleFactor withOpenASAR;
    pname = "discord";
    branch = "stable";
    binaryName = "Discord";
    desktopName = "Discord";
    version = "0.0.30";
    src = fetchurl {
      url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
      sha256 = "1nxllpkq45dkkzrrpl5gh7wdiwi29jf4hbwaszrcy95x63pwa9vq";
    };
    meta = pkgs.discord.meta;
    openasar = callPackage ./openasar.nix { };
  };
  canary = callPackage base rec {
    inherit deviceScaleFactor withOpenASAR;
    pname = "discord-canary";
    branch = "canary";
    binaryName = "DiscordCanary";
    desktopName = "Discord Canary";
    version = "0.0.167";
    src = fetchurl {
      url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
      sha256 = "1lcj8gqq5vmrmml1fh51dl020isagfq60bykjlcwbks9kb1pvbxr";
    };
    meta = pkgs.discord.meta;
    openasar = callPackage ./openasar.nix { };
  };
}
.${branch}
