diff options
Diffstat (limited to 'guix/upstream.scm')
-rw-r--r-- | guix/upstream.scm | 18 |
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." |