Skip to content

Commit

Permalink
discord: update all discord packages (#347886)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin authored Oct 12, 2024
2 parents bf17174 + a765e43 commit fe17be0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ stdenv.mkDerivation {
#!nix-shell -i bash -p curl gnugrep common-updater-scripts
set -x
set -eou pipefail;
url=$(curl -sI "https://discordapp.com/api/download/${
builtins.replaceStrings [ "discord-" "discord" ] [ "" "stable" ] pname
}?platform=osx&format=dmg" | grep -oP 'location: \K\S+')
version=''${url##https://dl*.discordapp.net/apps/osx/}
version=''${version%%/*.dmg}
url=$(curl -sI -o /dev/null -w '%header{location}' "https://discord.com/api/download/${branch}?platform=osx&format=dmg")
version=$(echo $url | grep -oP '/\K(\d+\.){2}\d+')
update-source-version ${lib.optionalString (!stdenv.buildPlatform.isDarwin) "pkgsCross.aarch64-darwin."}${pname} "$version" --file=./pkgs/applications/networking/instant-messengers/discord/default.nix --version-key=${branch}
'';
};
Expand Down
50 changes: 25 additions & 25 deletions pkgs/applications/networking/instant-messengers/discord/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,52 @@
let
versions =
if stdenv.hostPlatform.isLinux then {
stable = "0.0.70";
ptb = "0.0.105";
canary = "0.0.492";
development = "0.0.28";
stable = "0.0.71";
ptb = "0.0.110";
canary = "0.0.502";
development = "0.0.30";
} else {
stable = "0.0.318";
ptb = "0.0.133";
canary = "0.0.591";
development = "0.0.49";
stable = "0.0.322";
ptb = "0.0.140";
canary = "0.0.611";
development = "0.0.53";
};
version = versions.${branch};
srcs = rec {
x86_64-linux = {
stable = fetchurl {
url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
hash = "sha256-Ujlewrhbqal97hCG6+Iu+OqntWZJ/oY6ZHeL+HmoU38=";
url = "https://stable.dl2.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
hash = "sha256-PMcavgUhL8c1YFaWsooZObDa7APMqCD1IaysED5fWac=";
};
ptb = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
hash = "sha256-u/4wWssZxKlHrRW/Vd9pqUfqN2VQGYv1SDktpRsOayM=";
url = "https://ptb.dl2.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
hash = "sha256-NV/0YKn1rG54Zkc9qAmpeb+4YbKjxhjTCdPOd84Lcc8=";
};
canary = fetchurl {
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
hash = "sha256-NjcNgKYm1Twm8nN3sFlZCG/3x5fcSmX7X2On7CeZm0M=";
url = "https://canary.dl2.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
hash = "sha256-2DE7p3eT/mVGC+ejnTcTEhF7sEWyhfUfzj0gYTh+6Dw=";
};
development = fetchurl {
url = "https://dl-development.discordapp.net/apps/linux/${version}/discord-development-${version}.tar.gz";
hash = "sha256-326KAuqt3VQSgyJAdsdc7YgrdF3vCVoJoKUCVC2UdaU=";
url = "https://development.dl2.discordapp.net/apps/linux/${version}/discord-development-${version}.tar.gz";
hash = "sha256-HxMJQd5fM1VNfrBey4SbnnBkFQYZgbxg4YTy6FIC9Ps=";
};
};
x86_64-darwin = {
stable = fetchurl {
url = "https://dl.discordapp.net/apps/osx/${version}/Discord.dmg";
hash = "sha256-Ot6IM6EAg4MQPp0JqvUOZNAor6Nr6luc6pGY+722GMo=";
url = "https://stable.dl2.discordapp.net/apps/osx/${version}/Discord.dmg";
hash = "sha256-RLAdcCcRrUtDSdaj/RdVLJGvufpIjZoMAKxp0Jyu17A=";
};
ptb = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/osx/${version}/DiscordPTB.dmg";
hash = "sha256-FFp6CRgD/kpCVxJ4+es0DaOGaW5v2Aa+lzJdG2Zu8eY=";
url = "https://ptb.dl2.discordapp.net/apps/osx/${version}/DiscordPTB.dmg";
hash = "sha256-VGhvykujfzI7jwXE+lHTzqT0t08GaON6gCuf13po7wY=";
};
canary = fetchurl {
url = "https://dl-canary.discordapp.net/apps/osx/${version}/DiscordCanary.dmg";
hash = "sha256-TIXe8cy6feME0900R5aWyItZfUrUA8zXo0pqwQ79yAM=";
url = "https://canary.dl2.discordapp.net/apps/osx/${version}/DiscordCanary.dmg";
hash = "sha256-QC8RANqoyMAGKjTF0NNhz7wMt65D5LI1xYtd++dHXC4=";
};
development = fetchurl {
url = "https://dl-development.discordapp.net/apps/osx/${version}/DiscordDevelopment.dmg";
hash = "sha256-kfHnS1NHuPD7UR7XvMdtY2LPsDRJVQHk7/Nm+cR/KGc=";
url = "https://development.dl2.discordapp.net/apps/osx/${version}/DiscordDevelopment.dmg";
hash = "sha256-DhY8s7Mhzos0ygB/WuoE07WK6hoIh/FcETeIsffw+e0=";
};
};
aarch64-darwin = x86_64-darwin;
Expand Down Expand Up @@ -78,7 +78,7 @@ let
meta = meta // { mainProgram = value.binaryName; };
}))
{
stable = rec {
stable = {
pname = "discord";
binaryName = "Discord";
desktopName = "Discord";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,8 @@ stdenv.mkDerivation rec {
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep common-updater-scripts
set -eou pipefail;
url=$(curl -sI "https://discordapp.com/api/download/${
builtins.replaceStrings [ "discord-" "discord" ] [ "" "stable" ] pname
}?platform=linux&format=tar.gz" | grep -oP 'location: \K\S+')
version=''${url##https://dl*.discordapp.net/apps/linux/}
version=''${version%%/*.tar.gz}
url=$(curl -sI -o /dev/null -w '%header{location}' "https://discord.com/api/download/${branch}?platform=linux&format=tar.gz")
version=$(echo $url | grep -oP '/\K(\d+\.){2}\d+')
update-source-version ${pname} "$version" --file=./pkgs/applications/networking/instant-messengers/discord/default.nix --version-key=${branch}
'';
};
Expand Down

0 comments on commit fe17be0

Please sign in to comment.