diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-04-19 14:57:25 +0200 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-04-19 14:57:25 +0200 |
commit | 0ca211d4ec600fa7b3cc701e4997cd1e8d38ebdc (patch) | |
tree | 4f9b09ca5d55e44710f020bcf6621daa4fd6b73a /nixpkgs/maintainers/scripts | |
parent | 1c2ef52230ed2c8b2529c47ce6a857bdde46c7c7 (diff) | |
parent | b61999e4ad60c351b4da63ae3ff43aae3c0bbdfb (diff) |
Merge commit 'b61999e4ad60c351b4da63ae3ff43aae3c0bbdfb'
Diffstat (limited to 'nixpkgs/maintainers/scripts')
-rwxr-xr-x | nixpkgs/maintainers/scripts/update-discord | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/nixpkgs/maintainers/scripts/update-discord b/nixpkgs/maintainers/scripts/update-discord deleted file mode 100755 index b4c26b3bdef..00000000000 --- a/nixpkgs/maintainers/scripts/update-discord +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -# script to generate `pkgs/networking/instant-messengers/discord/default.nix` - -set -e -exec >${1:?usage: $0 <output-file>} - -cat <<EOF -{ branch ? "stable", pkgs }: -# Generated by /maintainers/scripts/update-discord -let - inherit (pkgs) callPackage fetchurl; -in { -EOF - -for branch in "" ptb canary; do - url=$(curl -sI "https://discordapp.com/api/download${branch:+/}${branch}?platform=linux&format=tar.gz" | grep -oP 'location: \K\S+') - version=${url##https://dl*.discordapp.net/apps/linux/} - version=${version%%/*.tar.gz} - echo " ${branch:-stable} = callPackage ./base.nix rec {" - echo " pname = \"discord${branch:+-}${branch}\";" - case $branch in - "") suffix="" ;; - ptb) suffix="PTB" ;; - canary) suffix="Canary" ;; - esac - echo " binaryName = \"Discord${suffix}\";" - echo " desktopName = \"Discord${suffix:+ }${suffix}\";" - echo " version = \"${version}\";" - echo " src = fetchurl {" - echo " url = \"${url//${version}/\$\{version\}}\";" - echo " sha256 = \"$(nix-prefetch-url "$url")\";" - echo " };" - echo " };" -done - -echo "}.\${branch}" |