wavebox: add update script
This commit is contained in:
parent
90c31a3d12
commit
35c9d66a03
@ -79,6 +79,8 @@ stdenv.mkDerivation {
|
||||
--prefix PATH : ${xdg-utils}/bin
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Wavebox messaging application";
|
||||
homepage = "https://wavebox.io";
|
||||
|
15
pkgs/applications/networking/instant-messengers/wavebox/update.sh
Executable file
15
pkgs/applications/networking/instant-messengers/wavebox/update.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p coreutils curl gnugrep
|
||||
set -euo pipefail
|
||||
|
||||
cd $(dirname "${BASH_SOURCE[0]}")
|
||||
|
||||
setKV () {
|
||||
sed -i "s|$2 = \".*\"|$2 = \"${3:-}\"|" $1
|
||||
}
|
||||
|
||||
version=$(curl -LIs --show-error -o /dev/null -w %{url_effective} 'https://download.wavebox.app/latest/stable/linux/tar' | grep -oP 'Wavebox_\K(.+)(?=.tar.gz)')
|
||||
|
||||
sha256_linux64=$(nix-prefetch-url --quiet https://download.wavebox.app/stable/linux/tar/Wavebox_${version}.tar.gz)
|
||||
setKV ./default.nix version $version
|
||||
setKV ./default.nix sha256 "$sha256_linux64"
|
Loading…
Reference in New Issue
Block a user