From 320f28390f12807e0e0408cb074f618cd16c8dbb Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Sat, 7 Oct 2023 21:45:11 +0200 Subject: import: github: Recognize more URLs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . This allows more packages to be refreshed, such as launchmon, love, retux, preseq, edgar, antlr3, and runc. * guix/import/github.scm (updated-github-url)[updated-url]: Add additional heuristics to Github url updater. Signed-off-by: Ludovic Courtès Change-Id: I6409b3f61872a954f53480afd63b307d16d0b9c0 --- guix/import/github.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'guix/import') diff --git a/guix/import/github.scm b/guix/import/github.scm index 7409c9a202..c5556d78ee 100644 --- a/guix/import/github.scm +++ b/guix/import/github.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2019 Efraim Flashner ;;; Copyright © 2022 Maxime Devos ;;; Copyright © 2022 Hartmut Goebel +;;; Copyright © 2023 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ (define-module (guix import github) #:use-module (ice-9 match) + #:use-module (ice-9 regex) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) @@ -96,6 +98,11 @@ false if none is recognized" url) (string-append prefix "/releases/download/" repo "-" new-version "/" repo "-" new-version ext)) + ((string-match (string-append "/releases/download/(v)?" version "/" + name ".*" ext "$") + url) + (string-replace-substring url version new-version)) + (#t #f))) ; Some URLs are not recognised. #f)) -- cgit v1.2.3