(name . Guix Patches)(address . guix-patches@gnu.org)
Here it is, chicken-build-system.
# What works
Building eggs, dependencies, importing them from search path.
# What's broken
Cross-compilation has not been attempted beacuse the Go build system I
based this on does not support it either.
# Necessary improvements
The Go build system removes some references. I was not sure if this is
needed for Chicken, so for now I left it out.
# Eggs
Some were selected because I'll need for the 9p egg, the rest because
the agrep egg was the first one I found that had dependencies, so it
was selected as a perfect test case.
I don't know if all eggs will work. Eggs that bind to native libraries
(like SDL) still need to be tested.
## SRFI-14 licensing
SRFI-14 has a weird license. The metadata says it's "BSD" but it's
clearly not BSD. I'm not sure what it is or if it's compatible with
Guix. If not, we could probably contact the authors and ask them to
relicense it.
# Chicken 4
Not attempted. Nix supports it but it's old and looks mostly abandoned.
I think we can skip it.
From 502235505c75446758cc1932bd1ba333644423ca Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Mon, 12 Oct 2020 04:11:59 +0200
Subject: [PATCH 01/11] gnu: Added search paths for Chicken Scheme.
* gnu/packages/chicken.scm (chicken): Added search paths
[native-search-paths]: added CHICKEN_REPOSITORY_PATH and CHICKEN_INCLUDE_PATH
---
gnu/packages/chicken.scm | 8 ++++++++
1 file changed, 8 insertions(+)
Toggle diff (21 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index 7b86a58012..0dd5571eec 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -59,6 +59,14 @@
;; Parallel builds are not supported, as noted in README.
#:parallel-build? #f))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "CHICKEN_REPOSITORY_PATH")
+ ;; TODO extract binary version into a module level definition.
+ (files (list "var/lib/chicken/11")))
+ (search-path-specification
+ (variable "CHICKEN_INCLUDE_PATH")
+ (files '("share")))))
(propagated-inputs `(("gcc-toolchain", gcc-toolchain)))
(home-page "https://www.call-cc.org/")
(synopsis "R5RS Scheme implementation that compiles native code via C")
--
2.28.0
From 8a03cdcda02988384fd3a2e6e36adf0713264311 Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Tue, 13 Oct 2020 09:49:35 +0200
Subject: [PATCH 03/11] gnu: Use qualified license names in chicken.scm instead
of selective import.
* gnu/packages/chicken.scm (chicken)[license]: Use qualified name.
---
gnu/packages/chicken.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Toggle diff (21 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index 0dd5571eec..567e043741 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -24,7 +24,7 @@
#:use-module (guix download)
#:use-module (gnu packages commencement)
#:use-module ((guix licenses)
- #:select (bsd-3)))
+ #:prefix license:))
(define-public chicken
(package
@@ -74,4 +74,4 @@
"CHICKEN is a compiler for the Scheme programming language. CHICKEN
produces portable and efficient C, supports almost all of the R5RS Scheme
language standard, and includes many enhancements and extensions.")
- (license bsd-3)))
+ (license license:bsd-3)))
--
2.28.0
From a7e3b91b76625e01eed749c2c83a94862e3ef738 Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Tue, 13 Oct 2020 09:55:42 +0200
Subject: [PATCH 04/11] gnu: Added imports for chicken eggs.
* gnu/packages/chicken.scm: New module imports.
---
gnu/packages/chicken.scm | 3 +++
1 file changed, 3 insertions(+)
Toggle diff (18 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index 567e043741..b9738c4737 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -20,8 +20,11 @@
(define-module (gnu packages chicken)
#:use-module (gnu packages)
#:use-module (guix packages)
+ #:use-module (guix build-system chicken)
#:use-module (guix build-system gnu)
#:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix svn-download)
#:use-module (gnu packages commencement)
#:use-module ((guix licenses)
#:prefix license:))
--
2.28.0
From 3cbb676b118c2db197b0d2b621cbcb5133e09fd9 Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Tue, 13 Oct 2020 09:51:02 +0200
Subject: [PATCH 05/11] gnu: Added chicken-srfi-1.
* gnu/packages/chicken.scm (chicken-srfi-1): New variable.
---
gnu/packages/chicken.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
Toggle diff (39 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index b9738c4737..d937ec7044 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -78,3 +78,32 @@
produces portable and efficient C, supports almost all of the R5RS Scheme
language standard, and includes many enhancements and extensions.")
(license license:bsd-3)))
+
+(define-public chicken-srfi-1
+ (package
+ (name "chicken-srfi-1")
+ (version "0.5.1")
+ (source
+ (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append
+ "https://code.call-cc.org/svn/chicken-eggs/"
+ "release/5/srfi-1/tags/"
+ version))
+ (revision 39055)
+ (user-name "anonymous")
+ (password "")))
+ (file-name "srfi-1")
+ (sha256
+ (base32
+ "02940zsjrmn7c34rnp1rllm2nahh9jvszlzrw8ak4pf31q09cmq1"))))
+ (build-system chicken-build-system)
+ (arguments '(#:egg-name "srfi-1"))
+ (home-page "http://wiki.call-cc.org/eggref/5/srfi-1")
+ (synopsis "SRFI-1 list library")
+ (description
+ "The list library defined in SRFI-1 contains a lot of useful list
+processing procedures for construction, examining, destructuring and
+manipulating lists and pairs.")
+ (license license:bsd-3)))
--
2.28.0
From f564a2ac0e3c716347245b90fe8c7d4332b91889 Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Tue, 13 Oct 2020 09:52:08 +0200
Subject: [PATCH 06/11] gnu: Added chicken-srfi-69
* gnu/packages/chicken.scm (chicken-srfi-69): New variable.
---
gnu/packages/chicken.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
Toggle diff (35 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index d937ec7044..b8878685fa 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -107,3 +107,28 @@ language standard, and includes many enhancements and extensions.")
processing procedures for construction, examining, destructuring and
manipulating lists and pairs.")
(license license:bsd-3)))
+
+(define-public chicken-srfi-69
+ (package
+ (name "chicken-srfi-69")
+ (version "0.4.1")
+ (source
+ (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "https://code.call-cc.org/svn/chicken-eggs/"
+ "release/5/srfi-69/tags/"
+ version))
+ (revision 39057)
+ (user-name "anonymous")
+ (password "")))
+ (sha256
+ (base32
+ "1z0m9vmg9bj9z0a941pls6igvg8nmhq4mj5psjjidbp0fac572mp"))))
+ (arguments '(#:egg-name "srfi-69"))
+ (build-system chicken-build-system)
+ (home-page "http://wiki.call-cc.org/eggref/5/srfi-69")
+ (synopsis "An implementation of SRFI 69 with SRFI 90 extensions")
+ (description
+ "Hash table implementation and binary search")
+ (license license:bsd-3)))
--
2.28.0
From 062e1ba3e468df07115bd022130d577132d13a41 Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Tue, 13 Oct 2020 09:52:54 +0200
Subject: [PATCH 07/11] gnu: Added chicken-iset.
* gnu/packages/chicken.scm (chicken-iset): New variable.
---
gnu/packages/chicken.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
Toggle diff (35 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index b8878685fa..7462431ba4 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -132,3 +132,28 @@ manipulating lists and pairs.")
(description
"Hash table implementation and binary search")
(license license:bsd-3)))
+
+(define-public chicken-iset
+ (package
+ (name "chicken-iset")
+ (version "2.2")
+ (source
+ (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "https://code.call-cc.org/svn/chicken-eggs/"
+ "release/5/iset/tags/" version))
+ (revision 39057)
+ (user-name "anonymous")
+ (password "")))
+ (sha256
+ (base32
+ "0gz50n5i561n5sk9prry0lrxz6bfrq9if5bclaq6a0f7lzinhnzb"))))
+ (build-system chicken-build-system)
+ (arguments '(#:egg-name "iset"))
+ (synopsis "Integer set library")
+ (home-page "http://wiki.call-cc.org/eggref/5/iset")
+ (description
+ " Bit-vectors provide an abstract interface to bitwise operations
+typically done with integers")
+ (license license:bsd-3)))
--
2.28.0
From bb4c402ff458239a9270680d1b7032182fcab5df Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Tue, 13 Oct 2020 09:53:40 +0200
Subject: [PATCH 08/11] gnu: Added chicken-datatype.
* gnu/packages/chicken.scm (chicken-datatype): New variable.
---
gnu/packages/chicken.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
Toggle diff (35 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index 7462431ba4..fcd5f242f4 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -157,3 +157,28 @@ manipulating lists and pairs.")
" Bit-vectors provide an abstract interface to bitwise operations
typically done with integers")
(license license:bsd-3)))
+
+(define-public chicken-datatype
+ (package
+ (name "chicken-datatype")
+ (version "1.6")
+ (source
+ (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "https://code.call-cc.org/svn/chicken-eggs/"
+ "release/5/datatype/tags/" version))
+ (revision 39057)
+ (user-name "anonymous")
+ (password "")))
+ (sha256
+ (base32
+ "1a58q8ypjkjz6wdv25247wixds4179239d36nnvsfn6gp70s9jfq"))))
+ (build-system chicken-build-system)
+ (arguments '(#:egg-name "datatype"))
+ (home-page "http://wiki.call-cc.org/eggref/5/datatype")
+ (synopsis "A facility for creating and using variant records")
+ (description
+ "A facility for creating and using variant records, as described
+in the book Essentials of Programming Languages by Friedman, Wand and Haynes")
+ (license license:bsd-3)))
--
2.28.0
From f20607f28be8bd050407e0ae582db7c03285dbb2 Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Tue, 13 Oct 2020 09:24:12 +0200
Subject: [PATCH 09/11] gnu: Added chicken-srfi-14.
* gnu/packages/chicken.scm (chicken-srfi-14): New variable.
---
gnu/packages/chicken.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
Toggle diff (40 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index fcd5f242f4..4229d0b21f 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -108,6 +108,33 @@ processing procedures for construction, examining, destructuring and
manipulating lists and pairs.")
(license license:bsd-3)))
+(define-public chicken-srfi-14
+ (package
+ (name "chicken-srfi-14")
+ (version "0.2.1")
+ (source
+ (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "https://code.call-cc.org/svn/chicken-eggs/"
+ "release/5/srfi-14/tags/" version))
+ (revision 39057)
+ (user-name "anonymous")
+ (password "")))
+ (sha256
+ (base32
+ "0wjsqfwawh9bx6vvii1gwag166bxkflc0ib374fbws14914g2ac1"))))
+ (build-system chicken-build-system)
+ (arguments '(#:egg-name "srfi-14"))
+ (home-page "http://wiki.call-cc.org/eggref/5/srfi-14")
+ (synopsis "Character set library")
+ (description
+ "Character sets can be created, extended, tested for the membership of
+a characters and be compared to other character sets")
+ (license (license:non-copyleft
+ "file://srfi-14.scm"
+ "See end of srfi-14.scm in the distribution."))))
+
(define-public chicken-srfi-69
(package
(name "chicken-srfi-69")
--
2.28.0
From aaef438dd04f85305c50f50003d0f17082bfb83c Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Tue, 13 Oct 2020 09:54:39 +0200
Subject: [PATCH 10/11] gnu: Added chicken-agrep.
* gnu/packages/chicken.scm (chicken-agrep): New variable.
---
gnu/packages/chicken.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
Toggle diff (39 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index 4229d0b21f..09f51a10af 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -209,3 +209,32 @@ typically done with integers")
"A facility for creating and using variant records, as described
in the book Essentials of Programming Languages by Friedman, Wand and Haynes")
(license license:bsd-3)))
+
+(define-public chicken-agrep
+ (package
+ (name "chicken-agrep")
+ (version "1.7")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/iraikov/chicken-agrep")
+ (commit version)))
+ (sha256
+ (base32
+ "0z05x7f154n9bgmainrsmncf5i6dil43r9ymr3rdgwbg4wnxmz4s"))))
+ ;; TODO do we really have to make these propagated?
+ ;; I don't know Chicken's module system well enough to tell
+ (propagated-inputs
+ `(("chicken-datatype" ,chicken-datatype)
+ ("chicken-srfi-1" ,chicken-srfi-1)
+ ("chicken-srfi-14" ,chicken-srfi-14)))
+ (build-system chicken-build-system)
+ (arguments '(#:egg-name "agrep"))
+ (synopsis "Approximate string matching library")
+ (home-page "http://wiki.call-cc.org/eggref/5/agrep")
+ (description
+ "This library implements the Wu-Manber algorithm for string searching
+with errors, popularized by the agrep Unix command and the glimpse file
+indexing tool.")
+ (license license:gpl3+)))
--
2.28.0
From 52a27d11eb3d4d0ced3deda01fe901bf2f1937fd Mon Sep 17 00:00:00 2001
From: raingloom <raingloom@riseup.net>
Date: Mon, 12 Oct 2020 04:19:46 +0200
Subject: [PATCH 11/11] gnu: Added myself to chicken.scm copyright.
---
gnu/packages/chicken.scm | 1 +
1 file changed, 1 insertion(+)
Toggle diff (14 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index 09f51a10af..378449582c 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;; Copyright © 2020 Evan Hanson <evhan@foldling.org>
+;;; Copyright © 2020 raingloom <raingloom@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
--
2.28.0