[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57460] [PATCH v3 12/18] import: hexpm: Allow updating to a specific
From: |
Hartmut Goebel |
Subject: |
[bug#57460] [PATCH v3 12/18] import: hexpm: Allow updating to a specific version. |
Date: |
Tue, 20 Dec 2022 10:34:17 +0100 |
* guix/import/hexpm.scm (latest-release): Rename to 'import-release',
add #:version argument.
If version is given, return an upstream-source for this version.
---
guix/import/hexpm.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm
index 3b63837393..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))
- (import latest-release)))
+ (import import-release)))
--
2.30.6
- [bug#57460] [PATCH v3 02/18] import: cpan: Remove unused exports., (continued)
- [bug#57460] [PATCH v3 02/18] import: cpan: Remove unused exports., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 11/18] import: gnome: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 08/18] import: gem: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 05/18] gnu-maintenance: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 13/18] import: kde: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 17/18] upstream: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 18/18] doc: Describe how to update to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 03/18] import: Issue error-message if version is given., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 10/18] import: github: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 12/18] import: hexpm: Allow updating to a specific version.,
Hartmut Goebel <=
- [bug#57460] [PATCH v3 09/18] import: git: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 14/18] import: launchpad: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 16/18] refresh: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 15/18] import: pypi: Allow updating to a specific version., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH v3 04/18] import: sourceforge: Issue error-message if version is given., Hartmut Goebel, 2022/12/20
- [bug#57460] [PATCH 00/19] Refresh to specific version, Ludovic Courtès, 2022/12/23