From: Edouard Klein <edk@beaver-labs.com>
To: 41949@debbugs.gnu.org
Subject: [bug#41949] [PATCH 1/5] gnu: Add gerbil
Date: Fri, 19 Jun 2020 15:35:29 +0200 [thread overview]
Message-ID: <87366r2n6n.fsf@alice.lan> (raw)
In-Reply-To: <875zbn2o5i.fsf@alice.lan>
* gnu/packages/scheme.scm: (gerbil): New variable.
---
gnu/packages/scheme.scm | 108 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 107 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 4551e57d4a..4ceabb1996 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,7 +32,7 @@
(define-module (gnu packages scheme)
#:use-module (gnu packages)
#:use-module ((guix licenses)
- #:select (gpl2+ lgpl2.0+ lgpl2.1+ lgpl3+ asl2.0 bsd-3
+ #:select (gpl2+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ asl2.0 bsd-3
cc-by-sa4.0 non-copyleft expat))
#:use-module (guix packages)
#:use-module (guix download)
@@ -70,6 +71,7 @@
#:use-module (gnu packages tls)
#:use-module (gnu packages gl)
#:use-module (gnu packages libedit)
+ #:use-module (gnu packages linux)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match))
@@ -1076,3 +1078,107 @@ multilingual support are some of the goals. Gauche comes with a package
manager/installer @code{gauche-package} which can download, compile, install
and list gauche extension packages.")
(license bsd-3)))
+
+(define-public gerbil
+ (package
+ (name "gerbil")
+ (version "0.16")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/vyzo/gerbil.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f"))))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'bootstrap)
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "src")
+ #t))
+ (replace 'configure
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (invoke "chmod" "755" "-R" ".")
+ ;; Otherwise fails when editing an r--r--r-- file.
+ (invoke "gsi-script" "configure"
+ "--prefix" (assoc-ref outputs "out")
+ "--with-gambit" (assoc-ref inputs "gambit-c"))))
+ (add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs
+ (lambda _
+ ;; Some .ss files refer to gxi using /usr/bin/env gxi
+ ;; and 'patch-generated-file-shebangs can't fix that
+ ;; because gxi has not been compiled yet.
+ ;; We know where gxi is going to end up so we
+ ;; Doctor Who our fix here before the problem
+ ;; happens towards the end of the build.sh script.
+ (let ((abs-srcdir (getcwd)))
+ (for-each
+ (lambda (f)
+ (substitute* f
+ (("#!/usr/bin/env gxi")
+ (string-append "#!" abs-srcdir "/../bin/gxi"))))
+ '("./gerbil/gxc"
+ "./lang/build.ss"
+ "./misc/http-perf/build.ss"
+ "./misc/rpc-perf/build.ss"
+ "./misc/scripts/docsnarf.ss"
+ "./misc/scripts/docstub.ss"
+ "./misc/scripts/docsyms.ss"
+ "./r7rs-large/build.ss"
+ "./release.ss"
+ "./std/build.ss"
+ "./std/run-tests.ss"
+ "./std/web/fastcgi-test.ss"
+ "./std/web/rack-test.ss"
+ "./tools/build.ss"
+ "./tutorial/httpd/build.ss"
+ "./tutorial/kvstore/build.ss"
+ "./tutorial/lang/build.ss"
+ "./tutorial/proxy/build-static.ss"
+ "./tutorial/proxy/build.ss")))
+ #t))
+ (replace
+ 'build
+ (lambda*
+ (#:key inputs #:allow-other-keys)
+ (setenv "HOME" (getcwd))
+ (invoke
+ ;; The build script needs a tty or it'll crash on an ioctl
+ ;; trying to find the width of the terminal it's running on.
+ ;; Calling in script prevents that.
+ "script"
+ "-qefc"
+ "./build.sh")))
+ (delete 'check)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (lib (string-append out "/lib")))
+ (mkdir-p bin)
+ (mkdir-p lib)
+ (copy-recursively "../bin" bin)
+ (copy-recursively "../lib" lib)))))))
+ (native-inputs
+ `(("coreutils" ,coreutils)
+ ("util-linux" ,util-linux)))
+ (propagated-inputs
+ `(("gambit-c" ,gambit-c)
+ ("zlib" ,zlib)
+ ("openssl" ,openssl)
+ ("sqlite" ,sqlite)))
+ (build-system gnu-build-system)
+ (synopsis "Meta-dialect of Scheme with post-modern features")
+ (description "Gerbil is an opinionated dialect of Scheme designed for Systems
+Programming, with a state of the art macro and module system on top of the Gambit
+runtime. The macro system is based on quote-syntax, and provides the full meta-syntactic
+tower with a native implementation of syntax-case. It also provides a full-blown module
+system, similar to PLT Scheme's (sorry, Racket) modules. The main difference from Racket
+is that Gerbil modules are single instantiation, supporting high performance ahead of
+time compilation and compiled macros.")
+ (home-page "https://cons.io")
+ (license `(,lgpl2.1 ,asl2.0))))
--
2.26.2
next prev parent reply other threads:[~2020-06-19 13:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-19 13:14 [bug#41949] Adding the Gerbil scheme language, build system and two packages Edouard Klein
2020-06-19 13:35 ` Edouard Klein [this message]
2020-09-02 15:04 ` [bug#41949] [PATCH 1/5] gnu: Add gerbil Ludovic Courtès
2020-06-19 13:36 ` [bug#41949] [PATCH 2/5] gnu: Add xlsxio Edouard Klein
2020-09-02 15:04 ` Ludovic Courtès
2020-06-19 13:36 ` [bug#41949] [PATCH 3/5] guix: Add gerbil-build-system Edouard Klein
2020-09-02 15:10 ` Ludovic Courtès
2020-09-07 15:54 ` edk
2020-06-19 13:36 ` [bug#41949] [PATCH 4/5] gnu: Add gerbil-srfi-54 Edouard Klein
2020-06-19 13:37 ` [bug#41949] [PATCH 5/5] gnu: Add gerbil-denatting Edouard Klein
[not found] ` <handler.41949.B.159257250323165.ack@debbugs.gnu.org>
2020-07-24 18:09 ` [bug#41949] Acknowledgement (Adding the Gerbil scheme language, build system and two packages) edk
2020-09-02 15:03 ` Ludovic Courtès
2020-09-07 15:49 ` edk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87366r2n6n.fsf@alice.lan \
--to=edk@beaver-labs.com \
--cc=41949@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).