From: Xinglu Chen <public@yoctocell.xyz>
To: 49889@debbugs.gnu.org
Subject: [bug#49889] [PATCH 1/5] gnu: gerbil: Move to (gnu packages gerbil).
Date: Thu, 05 Aug 2021 16:09:33 +0200 [thread overview]
Message-ID: <983c3e3a6b0b63c75044e33ed4b2dad87583158f.1628172101.git.public@yoctocell.xyz> (raw)
In-Reply-To: <cover.1628172101.git.public@yoctocell.xyz>
* gnu/packages/scheme.scm (gerbil): Move from here...
* gnu/packages/gerbil.scm: New module.
(gerbil): ...to here
* gnu/local.mk (GNU_SYSTEM_MODULES): Register gnu/packages/gerbil.scm.
---
gnu/local.mk | 2 +
gnu/packages/gerbil.scm | 137 ++++++++++++++++++++++++++++++++++++++++
gnu/packages/scheme.scm | 105 +-----------------------------
3 files changed, 140 insertions(+), 104 deletions(-)
create mode 100644 gnu/packages/gerbil.scm
diff --git a/gnu/local.mk b/gnu/local.mk
index 51a76e3638..ddbc057dc7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -44,6 +44,7 @@
# Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
# Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
# Copyright © 2021 Dmitry Polyakov <polyakov@liltechdude.xyz>
+# Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
#
# This file is part of GNU Guix.
#
@@ -239,6 +240,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/genealogy.scm \
%D%/packages/genimage.scm \
%D%/packages/geo.scm \
+ %D%/packages/gerbil.scm \
%D%/packages/gettext.scm \
%D%/packages/ghostscript.scm \
%D%/packages/gimp.scm \
diff --git a/gnu/packages/gerbil.scm b/gnu/packages/gerbil.scm
new file mode 100644
index 0000000000..69e7ae76a8
--- /dev/null
+++ b/gnu/packages/gerbil.scm
@@ -0,0 +1,137 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages gerbil)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages scheme)
+ #:use-module (gnu packages sqlite)
+ #:use-module (gnu packages tls)
+ #:use-module (gnu packages)
+ #:use-module (guix build-system gerbil)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix git-download)
+ #:use-module (guix packages)
+ #:use-module (ice-9 match)
+ #:use-module (srfi srfi-1))
+
+(define-public gerbil
+ (package
+ (name "gerbil")
+ (version "0.16")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/vyzo/gerbil")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'bootstrap)
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "src")))
+ (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")))))
+ (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)))
+ (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 (list license:lgpl2.1 license:asl2.0))))
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index c43d17219e..1ab4c329f8 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -13,7 +13,6 @@
;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
-;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
@@ -919,106 +918,4 @@ 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")
- (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.32.0
next prev parent reply other threads:[~2021-08-05 14:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 14:06 [bug#49889] [PATCH 0/5] Add build system for Gerbil Scheme Xinglu Chen
2021-08-05 14:09 ` Xinglu Chen [this message]
2021-08-05 14:09 ` [bug#49889] [PATCH 2/5] gnu: gerbil: Add 'native-search-paths' field Xinglu Chen
2021-08-05 14:10 ` [bug#49889] [PATCH 3/5] guix: Add 'gerbil-build-system' Xinglu Chen
2021-08-05 14:10 ` [bug#49889] [PATCH 4/5] gnu: Add gerbil-srfi-54 Xinglu Chen
2021-08-05 14:10 ` [bug#49889] [PATCH 5/5] gnu: Add gerbil-clojerbil Xinglu Chen
2021-08-07 16:59 ` Maxime Devos
2021-08-15 7:41 ` Xinglu Chen
2022-02-04 21:42 ` [bug#49889] [PATCH 0/5] Add build system for Gerbil Scheme Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=983c3e3a6b0b63c75044e33ed4b2dad87583158f.1628172101.git.public@yoctocell.xyz \
--to=public@yoctocell.xyz \
--cc=49889@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.