[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/18: import: hexpm: Allow updating to a specific version.
From: |
guix-commits |
Subject: |
12/18: import: hexpm: Allow updating to a specific version. |
Date: |
Mon, 26 Dec 2022 11:41:43 -0500 (EST) |
htgoebel pushed a commit to branch master
in repository guix.
commit e689f970335a67bc0aea611f1502cfeb6f4b6650
Author: Hartmut Goebel <h.goebel@crazy-compilers.com>
AuthorDate: Wed Jun 29 09:39:51 2022 +0200
import: hexpm: Allow updating to a specific version.
* 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)))
- branch master updated (c50cd1bbec -> 7c476873e0), guix-commits, 2022/12/26
- 01/18: upstream-updater: Rename record field., guix-commits, 2022/12/26
- 02/18: import: cpan: Remove unused exports., guix-commits, 2022/12/26
- 03/18: import: Issue error-message if version is given., guix-commits, 2022/12/26
- 10/18: import: github: Allow updating to a specific version., guix-commits, 2022/12/26
- 04/18: import: sourceforge: Issue error-message if version is given., guix-commits, 2022/12/26
- 05/18: gnu-maintenance: Allow updating to a specific version., guix-commits, 2022/12/26
- 07/18: import: egg: Allow updating to a specific version., guix-commits, 2022/12/26
- 09/18: import: git: Allow updating to a specific version., guix-commits, 2022/12/26
- 06/18: import: crate: Allow updating to a specific version., guix-commits, 2022/12/26
- 12/18: import: hexpm: Allow updating to a specific version.,
guix-commits <=
- 16/18: refresh: Allow updating to a specific version., guix-commits, 2022/12/26
- 14/18: import: launchpad: Allow updating to a specific version., guix-commits, 2022/12/26
- 17/18: upstream: Allow updating to a specific version., guix-commits, 2022/12/26
- 11/18: import: gnome: Allow updating to a specific version., guix-commits, 2022/12/26
- 08/18: import: gem: Allow updating to a specific version., guix-commits, 2022/12/26
- 18/18: doc: Describe how to update to a specific version., guix-commits, 2022/12/26
- 13/18: import: kde: Allow updating to a specific version., guix-commits, 2022/12/26
- 15/18: import: pypi: Allow updating to a specific version., guix-commits, 2022/12/26