* [bug#50022] [PATCH] build-system: chicken: Add 'egg-uri' procedure.
@ 2021-08-12 7:17 Xinglu Chen
2021-08-30 12:39 ` bug#50022: " Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Xinglu Chen @ 2021-08-12 7:17 UTC (permalink / raw)
To: 50022
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.
---
guix/build-system/chicken.scm | 10 +++++++++-
guix/import/egg.scm | 5 +++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm
index 9abae0431a..10f1469e88 100644
--- a/guix/build-system/chicken.scm
+++ b/guix/build-system/chicken.scm
@@ -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 @@
#: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.
diff --git a/guix/import/egg.scm b/guix/import/egg.scm
index 107894ddcf..89e7a9160d 100644
--- a/guix/import/egg.scm
+++ b/guix/import/egg.scm
@@ -87,7 +87,7 @@
(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 @@ not work."
(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))
base-commit: e6388b48f3df21b792cd61f93fddc7274238bac6
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#50022: [PATCH] build-system: chicken: Add 'egg-uri' procedure.
2021-08-12 7:17 [bug#50022] [PATCH] build-system: chicken: Add 'egg-uri' procedure Xinglu Chen
@ 2021-08-30 12:39 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2021-08-30 12:39 UTC (permalink / raw)
To: Xinglu Chen; +Cc: 50022-done
Hi,
Xinglu Chen <public@yoctocell.xyz> skribis:
> 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.
Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-30 12:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 7:17 [bug#50022] [PATCH] build-system: chicken: Add 'egg-uri' procedure Xinglu Chen
2021-08-30 12:39 ` bug#50022: " Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).