{anydesk,btrbk,nncp}: simplify update script

- There is no need to pass pname and version arguments

- The version lister does not use positional arguments anymore, but
option arguments. Removed the echo command to fix an issue regarding
this.
This commit is contained in:
José Romildo 2022-09-27 18:18:45 -03:00
parent 01510c7ff3
commit 1072e203b3
3 changed files with 0 additions and 6 deletions

View file

@ -30,9 +30,7 @@ in stdenv.mkDerivation rec {
passthru = {
updateScript = genericUpdater {
inherit pname version;
versionLister = writeShellScript "anydesk-versionLister" ''
echo "# Versions for $1:" >> "$2"
curl -s https://anydesk.com/en/downloads/linux \
| grep "https://[a-z0-9._/-]*-amd64.tar.gz" -o \
| uniq \

View file

@ -56,9 +56,7 @@ stdenv.mkDerivation rec {
passthru.tests.btrbk = nixosTests.btrbk;
passthru.updateScript = genericUpdater {
inherit pname version;
versionLister = writeShellScript "btrbk-versionLister" ''
echo "# Versions for $1:" >> "$2"
${curl}/bin/curl -s https://digint.ch/download/btrbk/releases/ | ${perl}/bin/perl -lne 'print $1 if /btrbk-([0-9.]*)\.tar/'
'';
};

View file

@ -30,9 +30,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
passthru.updateScript = genericUpdater {
inherit pname version;
versionLister = writeShellScript "nncp-versionLister" ''
echo "# Versions for $1:" >> "$2"
${curl}/bin/curl -s ${meta.downloadPage} | ${perl}/bin/perl -lne 'print $1 if /Release.*>([0-9.]+)</'
'';
};