vivaldi: ignore unused debian revision number

This commit is contained in:
Steven Kou 2022-09-04 03:14:19 +08:00
parent cb5a1a003d
commit 2fb2e966a5
No known key found for this signature in database
GPG key ID: D0D4BCFA8DB68E35
2 changed files with 4 additions and 4 deletions

View file

@ -20,10 +20,10 @@ let
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi"; vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "vivaldi"; pname = "vivaldi";
version = "5.4.2753.37-1"; version = "5.4.2753.37";
src = fetchurl { src = fetchurl {
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}_amd64.deb"; url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}-1_amd64.deb";
sha256 = "05aaprv1bqnb7iml1m6vlzv038dizy05ycwkrgb5nw1wiz9w6cyw"; sha256 = "05aaprv1bqnb7iml1m6vlzv038dizy05ycwkrgb5nw1wiz9w6cyw";
}; };

View file

@ -12,7 +12,7 @@ version() {
} }
vivaldi_version_old=$(version vivaldi) vivaldi_version_old=$(version vivaldi)
vivaldi_version=$(curl -sS https://vivaldi.com/download/ | sed -rne 's/.*vivaldi-stable_([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+-[0-9]+)_amd64\.deb.*/\1/p') vivaldi_version=$(curl -sS https://vivaldi.com/download/ | sed -rne 's/.*vivaldi-stable_([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)-1_amd64\.deb.*/\1/p')
if [[ "$vivaldi_version" = "$vivaldi_version_old" ]]; then if [[ "$vivaldi_version" = "$vivaldi_version_old" ]]; then
echo "vivaldi is already up-to-date" echo "vivaldi is already up-to-date"
@ -20,7 +20,7 @@ if [[ "$vivaldi_version" = "$vivaldi_version_old" ]]; then
fi fi
# Download vivaldi and save hash and file path. # Download vivaldi and save hash and file path.
url="https://downloads.vivaldi.com/stable/vivaldi-stable_${vivaldi_version}_amd64.deb" url="https://downloads.vivaldi.com/stable/vivaldi-stable_${vivaldi_version}-1_amd64.deb"
mapfile -t prefetch < <(nix-prefetch-url --print-path "$url") mapfile -t prefetch < <(nix-prefetch-url --print-path "$url")
hash=${prefetch[0]} hash=${prefetch[0]}
path=${prefetch[1]} path=${prefetch[1]}