mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
build-system: chicken: Add 'egg-uri' procedure.
Once Chicken 6 gets released, we can just adjust the URL in the ‘egg-uri’ procedure, instead of having to change the URL for all the Chicken packages. Making things a little more future-proof. * guix/build-system/chicken.scm (egg-uri): New procedure. * guix/import/egg.scm (egg-source-url): Adjust accordingly. (egg->guix-package): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
99160bc713
commit
0508622848
2 changed files with 12 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2020 raingloom <raingloom@riseup.net>
|
||||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -26,7 +27,14 @@ (define-module (guix build-system chicken)
|
|||
#:use-module (ice-9 match)
|
||||
#:export (%chicken-build-system-modules
|
||||
chicken-build
|
||||
chicken-build-system))
|
||||
chicken-build-system
|
||||
egg-uri))
|
||||
|
||||
(define* (egg-uri name version #:optional (extension ".tar.gz"))
|
||||
"Return a URI string for the CHICKEN egg corresponding to NAME and VERSION.
|
||||
EXTENSION is the file name extension, such as '.tar.gz'."
|
||||
(string-append "https://code.call-cc.org/egg-tarballs/5/"
|
||||
name "/" name "-" version extension))
|
||||
|
||||
(define %chicken-build-system-modules
|
||||
;; Build-side modules imported and used by default.
|
||||
|
|
|
@ -87,7 +87,7 @@ (define %eggs-home-page
|
|||
(define (egg-source-url name version)
|
||||
"Return the URL to the source tarball for version VERSION of the CHICKEN egg
|
||||
NAME."
|
||||
(string-append (%eggs-url) "/" name "/" name "-" version ".tar.gz"))
|
||||
`(egg-uri ,name version))
|
||||
|
||||
(define (egg-name->guix-name name)
|
||||
"Return the package name for CHICKEN egg NAME."
|
||||
|
@ -197,7 +197,8 @@ (define egg-content (if file
|
|||
(tarball (if source
|
||||
#f
|
||||
(with-store store
|
||||
(download-to-store store source-url)))))
|
||||
(download-to-store
|
||||
store (egg-uri name version))))))
|
||||
|
||||
(define egg-home-page
|
||||
(string-append (%eggs-home-page) "/" name))
|
||||
|
|
Loading…
Reference in a new issue