2024-06-23 23:25:45 -04:00
|
|
|
{ branch ? "stable", pkgs, callPackage, fetchurl, lib, stdenv }:
|
2024-04-27 16:05:00 -04:00
|
|
|
let
|
2024-06-23 23:25:45 -04:00
|
|
|
vencord = (import ./..{ inherit pkgs; }).vencord;
|
2024-04-27 16:05:00 -04:00
|
|
|
versions =
|
|
|
|
if stdenv.isLinux then {
|
2024-05-29 15:28:48 -04:00
|
|
|
stable = "0.0.53";
|
|
|
|
ptb = "0.0.84";
|
|
|
|
canary = "0.0.382";
|
|
|
|
development = "0.0.18";
|
2024-04-27 16:05:00 -04:00
|
|
|
} else {
|
2024-05-29 15:28:48 -04:00
|
|
|
stable = "0.0.303";
|
|
|
|
ptb = "0.0.113";
|
|
|
|
canary = "0.0.492";
|
|
|
|
development = "0.0.40";
|
2024-04-27 16:05:00 -04:00
|
|
|
};
|
|
|
|
version = versions.${branch};
|
|
|
|
srcs = rec {
|
|
|
|
x86_64-linux = {
|
|
|
|
stable = fetchurl {
|
|
|
|
url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
|
2024-05-29 15:28:48 -04:00
|
|
|
hash = "sha256-HD8bDFUV3YGk/t3Rbm26nXWDvUjjIf4ykdO6YGDtvTU=";
|
2024-04-27 16:05:00 -04:00
|
|
|
};
|
|
|
|
ptb = fetchurl {
|
|
|
|
url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
|
2024-05-29 15:28:48 -04:00
|
|
|
hash = "sha256-0bOsmy2ldZT7S4tVOkihE5eLiujXC/ugF8CKXfBXHNU=";
|
2024-04-27 16:05:00 -04:00
|
|
|
};
|
|
|
|
canary = fetchurl {
|
|
|
|
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
|
2024-05-29 15:28:48 -04:00
|
|
|
hash = "sha256-MXMq4V+21KPHoCUs5x1rNRbkfw6+3cF7xSSNguiqOfc=";
|
2024-04-27 16:05:00 -04:00
|
|
|
};
|
|
|
|
development = fetchurl {
|
|
|
|
url = "https://dl-development.discordapp.net/apps/linux/${version}/discord-development-${version}.tar.gz";
|
2024-05-29 15:28:48 -04:00
|
|
|
hash = "sha256-SoJ4/jXl0axQyeqv8CPSzM+lBsYq/QelHctRAeoscdA=";
|
2024-04-27 16:05:00 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
x86_64-darwin = {
|
|
|
|
stable = fetchurl {
|
|
|
|
url = "https://dl.discordapp.net/apps/osx/${version}/Discord.dmg";
|
2024-05-29 15:28:48 -04:00
|
|
|
hash = "sha256-B4r0W//d3761ufQr4PAt4ZuPMrOC7Zfo8Q3lHqKxkJ0=";
|
2024-04-27 16:05:00 -04:00
|
|
|
};
|
|
|
|
ptb = fetchurl {
|
|
|
|
url = "https://dl-ptb.discordapp.net/apps/osx/${version}/DiscordPTB.dmg";
|
2024-05-29 15:28:48 -04:00
|
|
|
hash = "sha256-hdT33jK0nHvY3rIh9i1eDq5j46xS9xInRxzGCUP/hi8=";
|
2024-04-27 16:05:00 -04:00
|
|
|
};
|
|
|
|
canary = fetchurl {
|
|
|
|
url = "https://dl-canary.discordapp.net/apps/osx/${version}/DiscordCanary.dmg";
|
2024-05-29 15:28:48 -04:00
|
|
|
hash = "sha256-74XQu4PGW3eW4wPICGsAVlR4SQkDXJWZ1p/G7Bwq950=";
|
2024-04-27 16:05:00 -04:00
|
|
|
};
|
|
|
|
development = fetchurl {
|
|
|
|
url = "https://dl-development.discordapp.net/apps/osx/${version}/DiscordDevelopment.dmg";
|
2024-05-29 15:28:48 -04:00
|
|
|
hash = "sha256-uPz3uWPAqp3JeL9E+coMrb2Hc+Zn0YGF9Jw3BTKYRlw=";
|
2024-04-27 16:05:00 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
aarch64-darwin = x86_64-darwin;
|
|
|
|
};
|
|
|
|
src = srcs.${stdenv.hostPlatform.system}.${branch};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "All-in-one cross-platform voice and text chat for gamers";
|
|
|
|
homepage = "https://discordapp.com/";
|
|
|
|
downloadPage = "https://discordapp.com/download";
|
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ MP2E Scrumplex artturin infinidoge jopejoe1 ];
|
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
|
|
|
mainProgram = "discord";
|
|
|
|
};
|
|
|
|
package =
|
|
|
|
if stdenv.isLinux
|
2024-06-23 23:25:45 -04:00
|
|
|
then ./linux.nix
|
2024-04-27 16:05:00 -04:00
|
|
|
else ./darwin.nix;
|
|
|
|
|
|
|
|
openasar = callPackage ./openasar.nix { };
|
|
|
|
|
|
|
|
packages = (
|
|
|
|
builtins.mapAttrs
|
|
|
|
(_: value:
|
|
|
|
callPackage package (value
|
|
|
|
// {
|
2024-05-29 15:28:48 -04:00
|
|
|
inherit src version openasar branch vencord;
|
2024-04-27 16:05:00 -04:00
|
|
|
meta = meta // { mainProgram = value.binaryName; };
|
|
|
|
}))
|
|
|
|
{
|
|
|
|
stable = rec {
|
|
|
|
pname = "discord";
|
|
|
|
binaryName = "Discord";
|
|
|
|
desktopName = "Discord";
|
|
|
|
};
|
|
|
|
ptb = rec {
|
|
|
|
pname = "discord-ptb";
|
|
|
|
binaryName = if stdenv.isLinux then "DiscordPTB" else desktopName;
|
|
|
|
desktopName = "Discord PTB";
|
|
|
|
};
|
|
|
|
canary = rec {
|
|
|
|
pname = "discord-canary";
|
|
|
|
binaryName = if stdenv.isLinux then "DiscordCanary" else desktopName;
|
|
|
|
desktopName = "Discord Canary";
|
|
|
|
};
|
|
|
|
development = rec {
|
|
|
|
pname = "discord-development";
|
|
|
|
binaryName = if stdenv.isLinux then "DiscordDevelopment" else desktopName;
|
|
|
|
desktopName = "Discord Development";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
in
|
2024-05-03 18:49:17 -04:00
|
|
|
packages.${branch}
|