From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uETaIxZrhV8RGgAA0tVLHw (envelope-from ) for ; Tue, 13 Oct 2020 08:53:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MLKeHxZrhV/FYgAAbx9fmQ (envelope-from ) for ; Tue, 13 Oct 2020 08:53:42 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 647509400D3 for ; Tue, 13 Oct 2020 08:53:41 +0000 (UTC) Received: from localhost ([::1]:56006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSG3v-0005ae-UB for larch@yhetil.org; Tue, 13 Oct 2020 04:53:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSG3O-0005Y5-Hr for guix-patches@gnu.org; Tue, 13 Oct 2020 04:53:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSG3K-0007xr-Bs for guix-patches@gnu.org; Tue, 13 Oct 2020 04:53:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kSG3K-00036n-BK for guix-patches@gnu.org; Tue, 13 Oct 2020 04:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43976] [PATCH] Chicken build system + some example eggs Resent-From: raingloom Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Oct 2020 08:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43976 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43976@debbugs.gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.160257915211904 (code B ref -1); Tue, 13 Oct 2020 08:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Oct 2020 08:52:32 +0000 Received: from localhost ([127.0.0.1]:45206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSG2k-00035q-7T for submit@debbugs.gnu.org; Tue, 13 Oct 2020 04:52:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:43790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSG2h-00035i-Mj for submit@debbugs.gnu.org; Tue, 13 Oct 2020 04:52:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSG2h-00057a-Bk for guix-patches@gnu.org; Tue, 13 Oct 2020 04:52:23 -0400 Received: from mx1.riseup.net ([198.252.153.129]:42258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSG2a-0007uN-Lb for guix-patches@gnu.org; Tue, 13 Oct 2020 04:52:22 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4C9TnC0hg6zFgRs for ; Tue, 13 Oct 2020 01:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1602579119; bh=rSRee91Jdyq5MwgX+2DAD+kFO7bMqrDadVBEiRl5I6Y=; h=Date:From:To:Subject:From; b=AUDbl1LX5qckEoa1F/dQPm0JlSlzX61UWK8qA2L+YTYF18LSTPG5BBY27h2HlRrAN yet4xcgnhh5LjFQijzkyQbyqwfBk2cIDePP8zlJhzyfs/hKeHR1BUhxZcszIF9KvfN zBZ3cAlWPEgNu14OIz8A5dZSKJ0DQ5LzZ9yt1W20= X-Riseup-User-ID: F2BEBA530941D54587ABBF68DDC6DDC1CB52E0B64184D72F32371A7D00AAF2A0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4C9TnB2TvzzJmys for ; Tue, 13 Oct 2020 01:51:55 -0700 (PDT) Date: Tue, 13 Oct 2020 10:52:20 +0200 From: raingloom Message-ID: <20201013105220.7606ee5a@riseup.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/kp9IG+qxiKrEBhV4_nIhV/I" Received-SPF: pass client-ip=198.252.153.129; envelope-from=raingloom@riseup.net; helo=mx1.riseup.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/13 04:10:32 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.4 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=riseup.net header.s=squak header.b=AUDbl1LX; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: gYazfp9e8MTM --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-Added-search-paths-for-Chicken-Scheme.patch >From 502235505c75446758cc1932bd1ba333644423ca Mon Sep 17 00:00:00 2001 From: raingloom 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(+) 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 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0002-guix-Added-chicken-build-system.patch =46rom a734e591ad066c20a53f9d0f955716ba8422bac5 Mon Sep 17 00:00:00 2001 From: raingloom Date: Tue, 13 Oct 2020 09:26:52 +0200 Subject: [PATCH 02/11] guix: Added chicken-build-system. * guix/build-system/chicken.scm: New file. * guix/build/chicken-build-system.scm: New file. * Makefile.am: Add them. --- Makefile.am | 2 + guix/build-system/chicken.scm | 137 ++++++++++++++++++++++++++++ guix/build/chicken-build-system.scm | 103 +++++++++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 guix/build-system/chicken.scm create mode 100644 guix/build/chicken-build-system.scm diff --git a/Makefile.am b/Makefile.am index 8e91e1e558..a2b2ca1093 100644 --- a/Makefile.am +++ b/Makefile.am @@ -113,6 +113,7 @@ MODULES =3D \ guix/build-system/android-ndk.scm \ guix/build-system/ant.scm \ guix/build-system/cargo.scm \ + guix/build-system/chicken.scm \ guix/build-system/clojure.scm \ guix/build-system/cmake.scm \ guix/build-system/dub.scm \ @@ -162,6 +163,7 @@ MODULES =3D \ guix/build/download-nar.scm \ guix/build/cargo-build-system.scm \ guix/build/cargo-utils.scm \ + guix/build/chicken-build-system.scm \ guix/build/cmake-build-system.scm \ guix/build/dub-build-system.scm \ guix/build/dune-build-system.scm \ diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm new file mode 100644 index 0000000000..b1629b9929 --- /dev/null +++ b/guix/build-system/chicken.scm @@ -0,0 +1,137 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2020 raingloom +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build-system chicken) + #:use-module (guix utils) + #:use-module (guix derivations) + #:use-module (guix search-paths) + #:use-module (guix build-system) + #:use-module (guix build-system gnu) + #:use-module (guix packages) + #:use-module (ice-9 match) + #:export (%chicken-build-system-modules + chicken-build + chicken-build-system)) + +(define %chicken-build-system-modules + ;; Build-side modules imported and used by default. + `((guix build chicken-build-system) + (guix build union) + ,@%gnu-build-system-modules)) + +(define (default-chicken) + ;; Lazily resolve the binding to avoid a circular dependency. + ;; TODO is this actually needed in every build system? + (let ((chicken (resolve-interface '(gnu packages chicken)))) + (module-ref chicken 'chicken))) + +(define* (lower name + #:key source inputs native-inputs outputs system target + (chicken (default-chicken)) + #:allow-other-keys + #:rest arguments) + "Return a bag for NAME." + (define private-keywords + '(#:source #:target #:chicken #:inputs #:native-inputs)) + + ;; TODO: cross-compilation support + (and (not target) + (bag + (name name) + (system system) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@inputs + + ;; Keep the standard inputs of 'gnu-build-system'. + ;; Chicken compiles Scheme by using C as an interm= ediate language. + ,@(standard-packages))) + (build-inputs `(("chicken" ,chicken) + ,@native-inputs)) + (outputs outputs) + (build chicken-build) + (arguments (strip-keyword-arguments private-keywords arguments)))= )) + +(define* (chicken-build store name inputs + #:key + (phases '(@ (guix build chicken-build-system) + %standard-phases)) + (outputs '("out")) + (search-paths '()) + (install-source? #t) + (egg-name "") + (unpack-path "") + (build-flags ''()) + (tests? #t) + ;; TODO holdover from go.scm + ;; not yet sure if it should be removed. + (allow-chicken-reference? #f) + (system (%current-system)) + (guile #f) + (imported-modules %chicken-build-system-modules) + (modules '((guix build chicken-build-system) + (guix build union) + (guix build utils)))) + (define builder + `(begin + (use-modules ,@modules) + (chicken-build #:name ,name + #:source ,(match (assoc-ref inputs "source") + (((? derivation? source)) + (derivation->output-path source)) + ((source) + source) + (source + source)) + #:system ,system + #:phases ,phases + #:outputs %outputs + #:search-paths ',(map search-path-specification->sexp + search-paths) + #:install-source? ,install-source? + #:egg-name ,egg-name + #:unpack-path ,unpack-path + #:build-flags ,build-flags + #:tests? ,tests? + #:allow-chicken-reference? ,allow-chicken-reference? + #:inputs %build-inputs))) + + (define guile-for-build + (match guile + ((? package?) + (package-derivation store guile system #:graft? #f)) + (#f ; the default + (let* ((distro (resolve-interface '(gnu packages commencement))) + (guile (module-ref distro 'guile-final))) + (package-derivation store guile system + #:graft? #f))))) + + (build-expression->derivation store name builder + #:inputs inputs + #:system system + #:modules imported-modules + #:outputs outputs + #:guile-for-build guile-for-build)) + +(define chicken-build-system + (build-system + (name 'chicken) + (description + "Build system for Chicken Scheme programs") + (lower lower))) diff --git a/guix/build/chicken-build-system.scm b/guix/build/chicken-build= -system.scm new file mode 100644 index 0000000000..ee2b15d6c1 --- /dev/null +++ b/guix/build/chicken-build-system.scm @@ -0,0 +1,103 @@ +(define-module (guix build chicken-build-system) + #:use-module ((guix build gnu-build-system) #:prefix gnu:) + #:use-module (guix build union) + #:use-module (guix build utils) + #:use-module (ice-9 match) + #:use-module (ice-9 ftw) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (rnrs io ports) + #:use-module (rnrs bytevectors) + #:export (%standard-phases + chicken-build)) + +;; CHICKEN_EGG_CACHE is where sources are fetched and binaries are built +;; CHICKEN_INSTALL_REPOSITORY is where dependencies are looked up +;; its first component is also where new eggs are installed. + +;; TODO: deduplicate with go-build-system.scm ? +;; TODO: the binary version should be defined in one of the relevant modul= es +;; instead of being hardcoded everywhere. Tried to do that but got undefin= ed +;; variable errors. + +(define (chicken-package? name) + (string-prefix? "chicken-" name)) + +(define* (setup-chicken-environment #:key inputs outputs #:allow-other-key= s) + (setenv "CHICKEN_INSTALL_REPOSITORY" + (string-concatenate + ;; see TODO item about binary version above + (append (list (assoc-ref outputs "out") "/var/lib/chicken/11/") + (let ((oldenv (getenv "CHICKEN_INSTALL_REPOSITORY"))) + (if oldenv + (list ":" oldenv) + '()))))) + (setenv "CHICKEN_EGG_CACHE" (getcwd)) + #t) + +;; This is copied from go-build-system.scm so it could probably be simplif= ied. +;; I used it because the source of the egg needs to be unpacked into a dir= ectory +;; that is named after the egg and I knew that the go build system does th= at. +(define* (unpack #:key source egg-name unpack-path #:allow-other-keys) + "Relative to $CHICKEN_EGG_CACHE, unpack SOURCE in UNPACK-PATH, or EGG-NA= ME +when UNPACK-PATH is unset. If the SOURCE archive has a single top level +directory, it is stripped so that the sources appear directly under UNPACK= -PATH. +When SOURCE is a directory, copy its content into UNPACK-PATH instead of +unpacking." + (define (unpack-maybe-strip source dest) + (let* ((scratch-dir (string-append (or (getenv "TMPDIR") "/tmp") + "/scratch-dir")) + (out (mkdir-p scratch-dir))) + (with-directory-excursion scratch-dir + (if (string-suffix? ".zip" source) + (invoke "unzip" source) + (invoke "tar" "-xvf" source)) + (let ((top-level-files (remove (lambda (x) + (member x '("." ".."))) + (scandir ".")))) + (match top-level-files + ((top-level-file) + (when (file-is-directory? top-level-file) + (copy-recursively top-level-file dest #:keep-mtime? #t))) + (_ + (copy-recursively "." dest #:keep-mtime? #t))))) + (delete-file-recursively scratch-dir))) + + (when (string-null? egg-name) + (display "WARNING: The egg name is unset.\n")) + (when (string-null? unpack-path) + (set! unpack-path egg-name)) + (let ((dest (string-append (getenv "CHICKEN_EGG_CACHE") "/" unpack-path)= )) + (mkdir-p dest) + (if (file-is-directory? source) + (copy-recursively source dest #:keep-mtime? #t) + (unpack-maybe-strip source dest))) + #t) + +(define* (build #:key egg-name #:allow-other-keys) + "Build the Chicken egg named by EGG-NAME" + (invoke "chicken-install" "-cached" "-no-install" egg-name)) + +(define* (install #:key egg-name outputs #:allow-other-keys) + "Install the already built egg named by EGG-NAME" + (invoke "chicken-install" "-cached" egg-name)) + +;; TODO how do we run tests??? + +;; TODO remove references + +(define %standard-phases + (modify-phases gnu:%standard-phases + (replace 'unpack unpack) + (delete 'bootstrap) + (delete 'configure) + (delete 'patch-generated-file-shebangs) + (add-before 'unpack 'setup-chicken-environment setup-chicken-environme= nt) + (replace 'build build) + (delete 'check) + (replace 'install install))) + +(define* (chicken-build #:key inputs (phases %standard-phases) + #:allow-other-keys #:rest args) + "Build the given Chicken package, applying all of PHASES in order." + (apply gnu:gnu-build #:inputs inputs #:phases phases args)) --=20 2.28.0 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0003-gnu-Use-qualified-license-names-in-chicken.scm-inste.patch >From 8a03cdcda02988384fd3a2e6e36adf0713264311 Mon Sep 17 00:00:00 2001 From: raingloom 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(-) 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 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0004-gnu-Added-imports-for-chicken-eggs.patch >From a7e3b91b76625e01eed749c2c83a94862e3ef738 Mon Sep 17 00:00:00 2001 From: raingloom 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(+) 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 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0005-gnu-Added-chicken-srfi-1.patch >From 3cbb676b118c2db197b0d2b621cbcb5133e09fd9 Mon Sep 17 00:00:00 2001 From: raingloom 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(+) 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 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0006-gnu-Added-chicken-srfi-69.patch >From f564a2ac0e3c716347245b90fe8c7d4332b91889 Mon Sep 17 00:00:00 2001 From: raingloom 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(+) 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 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0007-gnu-Added-chicken-iset.patch >From 062e1ba3e468df07115bd022130d577132d13a41 Mon Sep 17 00:00:00 2001 From: raingloom 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(+) 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 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0008-gnu-Added-chicken-datatype.patch >From bb4c402ff458239a9270680d1b7032182fcab5df Mon Sep 17 00:00:00 2001 From: raingloom 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(+) 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 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0009-gnu-Added-chicken-srfi-14.patch >From f20607f28be8bd050407e0ae582db7c03285dbb2 Mon Sep 17 00:00:00 2001 From: raingloom 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(+) 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 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0010-gnu-Added-chicken-agrep.patch >From aaef438dd04f85305c50f50003d0f17082bfb83c Mon Sep 17 00:00:00 2001 From: raingloom 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(+) 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 --MP_/kp9IG+qxiKrEBhV4_nIhV/I Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0011-gnu-Added-myself-to-chicken.scm-copyright.patch =46rom 52a27d11eb3d4d0ced3deda01fe901bf2f1937fd Mon Sep 17 00:00:00 2001 From: raingloom 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(+) 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 =C2=A9 2020 Ekaitz Zarraga ;;; Copyright =C2=A9 2020 Evan Hanson +;;; Copyright =C2=A9 2020 raingloom ;;; ;;; This file is part of GNU Guix. ;;; --=20 2.28.0 --MP_/kp9IG+qxiKrEBhV4_nIhV/I--