diff options
author | Marius Bakke <marius@gnu.org> | 2022-12-28 01:02:47 +0100 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2022-12-28 01:02:47 +0100 |
commit | ec0fbb471dfc6f72796da9ebafbb0630daa91267 (patch) | |
tree | 3b42f3d0a6470d85fbb8421179634bb278883e4e /guix/import/hexpm.scm | |
parent | f5ef7d34e4deecb80aff585c108b0a2ab1f33ce4 (diff) | |
parent | 0cb8f7125b19264b01962c1249c3df4c5ce85aa9 (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'guix/import/hexpm.scm')
-rw-r--r-- | guix/import/hexpm.scm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm index 2a7a9f3d82..8a009fd245 100644 --- a/guix/import/hexpm.scm +++ b/guix/import/hexpm.scm @@ -328,11 +328,12 @@ latest version of PACKAGE-NAME." ;;; Updater ;;; -(define (latest-release package) - "Return an <upstream-source> for the latest release of PACKAGE." +(define* (import-release package #:key (version #f)) + "Return an <upstream-source> for the latest release of PACKAGE. Optionally +include a VERSION string to fetch a specific version." (let* ((hexpm-name (guix-package->hexpm-name package)) (hexpm (lookup-hexpm hexpm-name)) - (version (hexpm-latest-release hexpm)) + (version (or version (hexpm-latest-release hexpm))) (url (hexpm-uri hexpm-name version))) (upstream-source (package (package-name package)) @@ -344,4 +345,4 @@ latest version of PACKAGE-NAME." (name 'hexpm) (description "Updater for hex.pm packages") (pred (url-prefix-predicate hexpm-package-url)) - (latest latest-release))) + (import import-release))) |