summaryrefslogtreecommitdiff
path: root/guix/upstream.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2017-07-06 09:13:31 +0300
committerEfraim Flashner <efraim@flashner.co.il>2017-10-09 14:05:17 +0300
commitadf0c531a845fb03c92e1f28e26e5c31adb95e4a (patch)
tree19680b6229566f55399888cf479ee6235ee3ba45 /guix/upstream.scm
parentc723271f30ac500472d8068b090bc8e6df78fce0 (diff)
downloadgnu-guix-adf0c531a845fb03c92e1f28e26e5c31adb95e4a.tar
gnu-guix-adf0c531a845fb03c92e1f28e26e5c31adb95e4a.tar.gz
guix: lint: Add checker for new upstream versions.
* guix/scripts/lint.scm (check-for-updates): New procedure. (%checkers): Add it. * guix/scripts/refresh.scm (importer-modules, %updaters): Move from here ... * guix/upstream.scm: ... to here.
Diffstat (limited to 'guix/upstream.scm')
-rw-r--r--guix/upstream.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 6ad52ac960..0fe3308876 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -20,6 +20,7 @@
(define-module (guix upstream)
#:use-module (guix records)
#:use-module (guix utils)
+ #:use-module (guix discovery)
#:use-module ((guix download)
#:select (download-to-store))
#:use-module (guix gnupg)
@@ -55,6 +56,7 @@
upstream-updater-predicate
upstream-updater-latest
+ %updaters
lookup-updater
download-tarball
@@ -146,6 +148,22 @@ correspond to the same version."
(pred upstream-updater-predicate)
(latest upstream-updater-latest))
+(define (importer-modules)
+ "Return the list of importer modules."
+ (cons (resolve-interface '(guix gnu-maintenance))
+ (all-modules (map (lambda (entry)
+ `(,entry . "guix/import"))
+ %load-path))))
+
+(define %updaters
+ ;; The list of publically-known updaters.
+ (delay (fold-module-public-variables (lambda (obj result)
+ (if (upstream-updater? obj)
+ (cons obj result)
+ result))
+ '()
+ (importer-modules))))
+
(define (lookup-updater package updaters)
"Return an updater among UPDATERS that matches PACKAGE, or #f if none of
them matches."