diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2022-07-14 10:54:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 10:54:01 +0200 |
commit | 1f5af608e7bab7b67b47ceafcc5668e34afaae83 (patch) | |
tree | 897ad0958ac126ec828c202b01d9571a96e218ef /pkgs | |
parent | ddeb18d6e58e7d0a559cb8bd3e0a9fd1b742abb8 (diff) | |
parent | 76ff0191534b2123b6c56e09e674b4e86362165e (diff) |
Merge pull request #179433 from mweinelt/firefox-updatescript
firefox: Extend upgrade script with version prefix
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/networking/browsers/firefox/packages.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/networking/browsers/firefox/update.nix | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/packages.nix b/pkgs/applications/networking/browsers/firefox/packages.nix index 788a339ea0d2..b203a6f86f8d 100644 --- a/pkgs/applications/networking/browsers/firefox/packages.nix +++ b/pkgs/applications/networking/browsers/firefox/packages.nix @@ -48,6 +48,7 @@ rec { tests = [ nixosTests.firefox-esr-102 ]; updateScript = callPackage ./update.nix { attrPath = "firefox-esr-102-unwrapped"; + versionPrefix = "102"; versionSuffix = "esr"; }; }; @@ -74,6 +75,7 @@ rec { tests = [ nixosTests.firefox-esr-91 ]; updateScript = callPackage ./update.nix { attrPath = "firefox-esr-91-unwrapped"; + versionPrefix = "91"; versionSuffix = "esr"; }; }; diff --git a/pkgs/applications/networking/browsers/firefox/update.nix b/pkgs/applications/networking/browsers/firefox/update.nix index bbfd17d1fea8..4a24fe85b2ee 100644 --- a/pkgs/applications/networking/browsers/firefox/update.nix +++ b/pkgs/applications/networking/browsers/firefox/update.nix @@ -10,6 +10,7 @@ , attrPath , runtimeShell , baseUrl ? "http://archive.mozilla.org/pub/firefox/releases/" +, versionPrefix ? "" , versionSuffix ? "" , versionKey ? "version" }: @@ -32,7 +33,7 @@ writeScript "update-${attrPath}" '' # - sorts everything with semver in mind # - picks up latest release version=`xidel -s $url --extract "//a" | \ - grep "^[0-9.]*${versionSuffix}/$" | \ + grep "^${versionPrefix}[0-9.]*${versionSuffix}/$" | \ sed s/[/]$// | \ sort --version-sort | \ tail -n 1` |