mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
import: egg: Allow updating to a specific version.
* guix/import/egg.scm (latest-release): Rename to 'import-release', add #:version argument. If version is given, return an upstream-source for this version.
This commit is contained in:
parent
7c4aab1f7d
commit
af44a8550c
1 changed files with 6 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
||||||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||||
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
|
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
|
||||||
|
;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -333,10 +334,11 @@ not work."
|
||||||
;;; Updater.
|
;;; Updater.
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define (latest-release package)
|
(define* (import-release package #:key (version #f))
|
||||||
"Return an @code{<upstream-source>} for the latest release of PACKAGE."
|
"Return an @code{<upstream-source>} for the latest release of PACKAGE.
|
||||||
|
Optionally include a VERSION string to fetch a specific version."
|
||||||
(let* ((egg-name (guix-package->egg-name package))
|
(let* ((egg-name (guix-package->egg-name package))
|
||||||
(version (find-latest-version egg-name))
|
(version (or version (find-latest-version egg-name)))
|
||||||
(source-url (egg-uri egg-name version)))
|
(source-url (egg-uri egg-name version)))
|
||||||
(upstream-source
|
(upstream-source
|
||||||
(package (package-name package))
|
(package (package-name package))
|
||||||
|
@ -348,6 +350,6 @@ not work."
|
||||||
(name 'egg)
|
(name 'egg)
|
||||||
(description "Updater for CHICKEN egg packages")
|
(description "Updater for CHICKEN egg packages")
|
||||||
(pred egg-package?)
|
(pred egg-package?)
|
||||||
(import latest-release)))
|
(import import-release)))
|
||||||
|
|
||||||
;;; egg.scm ends here
|
;;; egg.scm ends here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue