[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/18: import: gem: Allow updating to a specific version.
From: |
guix-commits |
Subject: |
08/18: import: gem: Allow updating to a specific version. |
Date: |
Mon, 26 Dec 2022 11:41:42 -0500 (EST) |
htgoebel pushed a commit to branch master
in repository guix.
commit 1e39f475a2695490bb9a229981e91fc23a899e6d
Author: Hartmut Goebel <h.goebel@crazy-compilers.com>
AuthorDate: Tue Nov 1 11:37:28 2022 +0100
import: gem: Allow updating to a specific version.
* guix/import/gem.scm (latest-release): Rename to 'import-release',
add #:version argument.
If version is given, return an upstream-source for this version.
---
guix/import/gem.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/guix/import/gem.scm b/guix/import/gem.scm
index 1c6c55baa6..8ad0662628 100644
--- a/guix/import/gem.scm
+++ b/guix/import/gem.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
+;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -173,11 +174,11 @@ package on RubyGems."
(define gem-package?
(url-prefix-predicate "https://rubygems.org/downloads/"))
-(define (latest-release package)
+(define* (import-release package #:key (version #f))
"Return an <upstream-source> for the latest release of PACKAGE."
(let* ((gem-name (guix-package->gem-name package))
(gem (rubygems-fetch gem-name))
- (version (gem-version gem))
+ (version (or version (gem-version gem)))
(url (rubygems-uri gem-name version)))
(upstream-source
(package (package-name package))
@@ -189,7 +190,7 @@ package on RubyGems."
(name 'gem)
(description "Updater for RubyGem packages")
(pred gem-package?)
- (import latest-release)))
+ (import import-release)))
(define* (gem-recursive-import package-name #:optional version)
(recursive-import package-name
- 04/18: import: sourceforge: Issue error-message if version is given., (continued)
- 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, 2022/12/26
- 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 <=
- 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