directoryListingUpdater2: align with upstream nixpkgs PR

This commit is contained in:
2024-10-09 23:29:57 +00:00
parent f7a21243da
commit 9aa5e82d93
2 changed files with 4 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ if __name__ == "__main__":
link_url = link.get("href", None)
if link_url is not None:
match = re.fullmatch(
rf"(.*/)?{args.pname}_([\d.]+?(-[\d\w.-]+?)?)(\.tar)?(\.[^.]*)", link_url
rf"(.*/)?{args.pname}[-_]([\d.]+?(-[\d\w.-]+?)?)(\.tar)?(\.[^.]*)", link_url
)
if match:
version = match.group(2)

View File

@@ -1,6 +1,9 @@
# heavily based on <repo:nixos/nixpkgs:pkgs/common-updater/scripts.nix>
# and <repo:nixos/nixpkgs:pkgs/common-updater/scripts/list-directory-versions>.
# main difference is that it does fuzzier matching.
#
# remove this package once this PR lands:
# - <https://github.com/NixOS/nixpkgs/pull/347619>
{
lib,
genericUpdater,