diff options
author | Tadeo Kondrak <me@tadeo.ca> | 2019-10-11 21:48:57 -0600 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2019-10-15 21:21:13 -0700 |
commit | 70167b64c55b488f115335269779f360194d9fe9 (patch) | |
tree | d40ffed61efe888cf07e60e1d60b34bac423155a /maintainers/scripts | |
parent | d2d95670a537dadfeba986399695a0846983ba76 (diff) | |
download | nixpkgs-70167b64c55b488f115335269779f360194d9fe9.tar nixpkgs-70167b64c55b488f115335269779f360194d9fe9.tar.gz nixpkgs-70167b64c55b488f115335269779f360194d9fe9.tar.bz2 nixpkgs-70167b64c55b488f115335269779f360194d9fe9.tar.lz nixpkgs-70167b64c55b488f115335269779f360194d9fe9.tar.xz nixpkgs-70167b64c55b488f115335269779f360194d9fe9.tar.zst nixpkgs-70167b64c55b488f115335269779f360194d9fe9.zip |
maintainers/scripts/update-discord: improve
- add comment specifying file is generated - remove repetition of version number
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-x | maintainers/scripts/update-discord | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/maintainers/scripts/update-discord b/maintainers/scripts/update-discord index 23ec6e401be..b4c26b3bdef 100755 --- a/maintainers/scripts/update-discord +++ b/maintainers/scripts/update-discord @@ -6,7 +6,7 @@ exec >${1:?usage: $0 <output-file>} cat <<EOF { branch ? "stable", pkgs }: - +# Generated by /maintainers/scripts/update-discord let inherit (pkgs) callPackage fetchurl; in { @@ -16,7 +16,7 @@ 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 {" + echo " ${branch:-stable} = callPackage ./base.nix rec {" echo " pname = \"discord${branch:+-}${branch}\";" case $branch in "") suffix="" ;; @@ -27,7 +27,7 @@ for branch in "" ptb canary; do echo " desktopName = \"Discord${suffix:+ }${suffix}\";" echo " version = \"${version}\";" echo " src = fetchurl {" - echo " url = \"${url}\";" + echo " url = \"${url//${version}/\$\{version\}}\";" echo " sha256 = \"$(nix-prefetch-url "$url")\";" echo " };" echo " };" |