From patchwork Thu Aug 5 14:09:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 31843 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E4C0427BC78; Thu, 5 Aug 2021 15:15:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3B09327BC6B for ; Thu, 5 Aug 2021 15:15:50 +0100 (BST) Received: from localhost ([::1]:51296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBeA1-0007bK-8v for patchwork@mira.cbaines.net; Thu, 05 Aug 2021 10:15:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBe4Q-0002IY-Lg for guix-patches@gnu.org; Thu, 05 Aug 2021 10:10:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBe4Q-0008WA-Ej for guix-patches@gnu.org; Thu, 05 Aug 2021 10:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBe4Q-000752-7h for guix-patches@gnu.org; Thu, 05 Aug 2021 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49889] [PATCH 1/5] gnu: gerbil: Move to (gnu packages gerbil). Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Aug 2021 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49889 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49889@debbugs.gnu.org Received: via spool by 49889-submit@debbugs.gnu.org id=B49889.162817259627195 (code B ref 49889); Thu, 05 Aug 2021 14:10:02 +0000 Received: (at 49889) by debbugs.gnu.org; 5 Aug 2021 14:09:56 +0000 Received: from localhost ([127.0.0.1]:47983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe4A-00074J-Sd for submit@debbugs.gnu.org; Thu, 05 Aug 2021 10:09:56 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:32844 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe48-000742-8f for 49889@debbugs.gnu.org; Thu, 05 Aug 2021 10:09:45 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1628172574; bh=ox8vgKmYXve4r/rKMivcjH79PE9SfcmBotz+GIpz0A4=; h=From:To:Subject:In-Reply-To:References:Date; b=SZ3RyyJpVkmrkDwHcvBf8YAlO8m8iQOQJX3bAjLncwA1jWE+wCrGwNSuNKJstk0QT yVf3y/VUPhmt1imhhSOXzmtqYPTCAU22jss33V/xsqLDgQnzfSmnh143I45Ju1k6Bw sqoLLgtjhG5PfAfbqjTsde9uDRKsG1LMAlHwzJiM= In-Reply-To: References: Message-Id: <983c3e3a6b0b63c75044e33ed4b2dad87583158f.1628172101.git.public@yoctocell.xyz> Date: Thu, 05 Aug 2021 16:09:33 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 # Copyright © 2021 Sharlatan Hellseher # Copyright © 2021 Dmitry Polyakov +# Copyright © 2021 Xinglu Chen # # 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 +;;; Copyright © 2021 Xinglu Chen +;;; +;;; 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 (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 ;;; Copyright © 2020 Pierre Neidhardt ;;; Copyright © 2020 Brett Gilio -;;; Copyright © 2020 Edouard Klein ;;; Copyright © 2021 Philip McGrath ;;; Copyright © 2021 Guillaume Le Vaillant ;;; @@ -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)))) + From patchwork Thu Aug 5 14:09:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 31844 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0564E27BC78; Thu, 5 Aug 2021 15:21:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D21F927BC6B for ; Thu, 5 Aug 2021 15:21:34 +0100 (BST) Received: from localhost ([::1]:39314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBeFZ-0001nd-Uz for patchwork@mira.cbaines.net; Thu, 05 Aug 2021 10:21:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBe4R-0002KB-0y for guix-patches@gnu.org; Thu, 05 Aug 2021 10:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBe4Q-00004u-QE for guix-patches@gnu.org; Thu, 05 Aug 2021 10:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBe4Q-00075A-LJ for guix-patches@gnu.org; Thu, 05 Aug 2021 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49889] [PATCH 2/5] gnu: gerbil: Add 'native-search-paths' field. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Aug 2021 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49889 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49889@debbugs.gnu.org Received: via spool by 49889-submit@debbugs.gnu.org id=B49889.162817259627201 (code B ref 49889); Thu, 05 Aug 2021 14:10:02 +0000 Received: (at 49889) by debbugs.gnu.org; 5 Aug 2021 14:09:56 +0000 Received: from localhost ([127.0.0.1]:47986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe4K-00074a-BI for submit@debbugs.gnu.org; Thu, 05 Aug 2021 10:09:56 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:32850 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe4B-000749-Ph for 49889@debbugs.gnu.org; Thu, 05 Aug 2021 10:09:48 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1628172580; bh=Wo9+UA48IYUdUtmdPek8gQ2JaO6yZ2SSBJYYyNMfll8=; h=From:To:Subject:In-Reply-To:References:Date; b=RnB1nyOuNaWfoGQYPl4yHTn32CqXclbnhbUsYQZhrabeWDQGOBCH5hH1k+Pfb4wLF na6in/0EQZIgWllhaTJPhoJoMeP2sDSNs64pkWQZNK6dbZcBR630AJfV4bn36areET 60yFj8y2fZo8hRPaV6wD+a8O4q8n0bsRq1lx62g0= In-Reply-To: References: Message-Id: <021b419a576c675a1ea40a5f4885c098478fcc48.1628172101.git.public@yoctocell.xyz> Date: Thu, 05 Aug 2021 16:09:39 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gerbil.scm (gerbil): Add ‘native-search-paths’ field. --- gnu/packages/gerbil.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/packages/gerbil.scm b/gnu/packages/gerbil.scm index 69e7ae76a8..90559e9ea2 100644 --- a/gnu/packages/gerbil.scm +++ b/gnu/packages/gerbil.scm @@ -125,6 +125,10 @@ ("zlib" ,zlib) ("openssl" ,openssl) ("sqlite" ,sqlite))) + (native-search-paths + (list (search-path-specification + (variable "GERBIL_LOADPATH") + (files (list "lib/gerbil"))))) (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 From patchwork Thu Aug 5 14:10:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 31841 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1D1AF27BC78; Thu, 5 Aug 2021 15:11:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6EE3E27BC6B for ; Thu, 5 Aug 2021 15:11:12 +0100 (BST) Received: from localhost ([::1]:34698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBe5X-0004mk-Ck for patchwork@mira.cbaines.net; Thu, 05 Aug 2021 10:11:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBe5O-0004fm-3B for guix-patches@gnu.org; Thu, 05 Aug 2021 10:11:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36451) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBe5N-0000sV-R8 for guix-patches@gnu.org; Thu, 05 Aug 2021 10:11:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBe5N-00077E-Ml for guix-patches@gnu.org; Thu, 05 Aug 2021 10:11:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49889] [PATCH 3/5] guix: Add 'gerbil-build-system'. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Aug 2021 14:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49889 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49889@debbugs.gnu.org Received: via spool by 49889-submit@debbugs.gnu.org id=B49889.162817262327283 (code B ref 49889); Thu, 05 Aug 2021 14:11:01 +0000 Received: (at 49889) by debbugs.gnu.org; 5 Aug 2021 14:10:23 +0000 Received: from localhost ([127.0.0.1]:47991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe4k-00075z-Q1 for submit@debbugs.gnu.org; Thu, 05 Aug 2021 10:10:23 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:32874 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe4i-00075k-O7 for 49889@debbugs.gnu.org; Thu, 05 Aug 2021 10:10:21 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1628172613; bh=RlqoIzaOrFjoNJTbq3fypOYjKQhrMpCTSBgyuQjHV64=; h=From:To:Subject:In-Reply-To:References:Date; b=E0fLzi247XKx4uI2eIIgxMDgoc3/WMqfzvWXiGBxrEq3zbA6lqN8xjUGhMvbOAhC4 IJKFnsOcT5NSx7IXENcV/BdWfA0LV7RbrRpartPczqf5C3ds0wRhVKQ/kCQs/EIndu UhyKsSem4ksPEjABOXIMCAS97yYTDdJBLYYQPG94= In-Reply-To: References: Message-Id: <925c0e686f56bcc19b2db7ab1c38767e3bd74b9e.1628172101.git.public@yoctocell.xyz> Date: Thu, 05 Aug 2021 16:10:13 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/build/gerbil-build-system.scm: New module. * guix/build-system/gerbil.scm: Likewise. * Makefile.am (MODULES): Register them. * doc/guix.texi (Build Systems): Document it * etc/snippets/scheme-mode/guix-package: Add ‘gerbil-build-system’ to list of build systems. --- Makefile.am | 2 + doc/guix.texi | 21 ++++ etc/snippets/scheme-mode/guix-package | 1 + guix/build-system/gerbil.scm | 138 ++++++++++++++++++++++++++ guix/build/gerbil-build-system.scm | 78 +++++++++++++++ 5 files changed, 240 insertions(+) create mode 100644 guix/build-system/gerbil.scm create mode 100644 guix/build/gerbil-build-system.scm diff --git a/Makefile.am b/Makefile.am index 5542aa1c56..4f773f27e5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -143,6 +143,7 @@ MODULES = \ guix/build-system/minify.scm \ guix/build-system/asdf.scm \ guix/build-system/copy.scm \ + guix/build-system/gerbil.scm \ guix/build-system/glib-or-gtk.scm \ guix/build-system/gnu.scm \ guix/build-system/guile.scm \ @@ -190,6 +191,7 @@ MODULES = \ guix/build/meson-build-system.scm \ guix/build/minify-build-system.scm \ guix/build/font-build-system.scm \ + guix/build/gerbil-build-system.scm \ guix/build/go-build-system.scm \ guix/build/android-repo.scm \ guix/build/asdf-build-system.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index a826171f34..4f2146b7ac 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7733,6 +7733,27 @@ only one of them. This is equivalent to passing the @code{-p} argument to @code{dune}. @end defvr +@defvr {Scheme Variable} gerbil-build-system +This variable is exported by @code{(guix build-system gerbil)}. It +implements a build procedure for Gerbil packages the standard +@uref{https://cons.io/guide/package-manager.html, Gerbil build +mechanism}. + +It runs the @file{build.ss} Gerbile script, which compiles the package. +The script can also take custom commands and flags, which can be +specified by the @code{#:build-flags} parameter. + +One can also specify a custom Gerbil package to use for compiling the +package by specifying the the @code{#:gerbil} parameter. + +Gerbil projects don't have a standardized way of running tests, so not +@code{check} phase is exists by default. + +@c TODO: Should Gerbil packages be ‘inputs’ or ‘propagated-inputs’? + +As of right now, cross-compilation is not supported. +@end defvr + @defvr {Scheme Variable} go-build-system This variable is exported by @code{(guix build-system go)}. It implements a build procedure for Go packages using the standard diff --git a/etc/snippets/scheme-mode/guix-package b/etc/snippets/scheme-mode/guix-package index 9ff6f997d1..e2d645f731 100644 --- a/etc/snippets/scheme-mode/guix-package +++ b/etc/snippets/scheme-mode/guix-package @@ -18,6 +18,7 @@ "dune-build-system" "emacs-build-system" "font-build-system" + "gerbil-build-system" "glib-or-gtk-build-system" "gnu-build-system" "go-build-system" diff --git a/guix/build-system/gerbil.scm b/guix/build-system/gerbil.scm new file mode 100644 index 0000000000..0dd61767b8 --- /dev/null +++ b/guix/build-system/gerbil.scm @@ -0,0 +1,138 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Xinglu Chen +;;; +;;; 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 gerbil) + #:use-module (guix utils) + #:use-module (guix build-system) + #:use-module (guix build-system gnu) + #:use-module (guix search-paths) + #:use-module (guix packages) + #:use-module (guix derivations) + #:use-module (ice-9 match) + #:export (gerbil-build-system)) + +;;; Commentary: +;;; +;;; Standard build procedure for packages using the Gerbil build system. +;;; +;;; Code: + +(define %gerbil-build-system-modules + ;; Build-side modules imported and used by default. + `((guix build gerbil-build-system) + (guix build union) + ,@%gnu-build-system-modules)) + +(define (default-gerbil) + "Return the default Gerbil package." + ;; Lazily resolve the binding to avoid circular dependency. + (let ((gerbil (resolve-interface '(gnu packages gerbil)))) + (module-ref gerbil 'gerbil))) + +(define* (lower name + #:key source inputs native-inputs outputs system target + (gerbil (default-gerbil)) + #:allow-other-keys + #:rest arguments) + "Return a bag for NAME." + (define private-keywords + '(#:source #:target #:gerbil #:inputs #:native-inputs)) + + ;; TODO: Cross-compilation support. + (and (not target) + (bag + (name name) + (system system) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@inputs)) + (build-inputs `(("gerbil" ,gerbil) + ("libc" ,(module-ref (resolve-interface + '(gnu packages base)) + 'glibc)) + ("gcc" ,(module-ref (resolve-interface + '(gnu packages gcc)) + 'gcc)) + ("binutils" ,(module-ref (resolve-interface + '(gnu packages base)) + 'binutils)) + ,@native-inputs)) + (outputs outputs) + (build gerbil-build) + (arguments (strip-keyword-arguments private-keywords arguments))))) + +(define* (gerbil-build store name inputs + #:key + (phases '(@ (guix build gerbil-build-system) + %standard-phases)) + (outputs '("out")) + (search-paths '()) + (build-flags ''()) + (gerbil (default-gerbil)) + ;; Tests are disabled by default because there is no + ;; standard way to test Gerbil packages. However, some + ;; packages might have custom test phases, so pass the + ;; #:tests? keyword, just in case. + (tests? #f) + (system (%current-system)) + (guile #f) + (imported-modules %gerbil-build-system-modules) + (modules '((guix build gerbil-build-system) + (guix build utils)))) + (define builder + `(begin + (use-modules ,@modules) + (gerbil-build #:name ,name + #:source ,(match (assoc-ref inputs "source") + (((? derivation? source)) + (derivation->output-path source)) + ((source) + source) + (source + source)) + #:tests? ,tests? + #:system ,system + #:phases ,phases + #:outputs %outputs + #:build-flags ,build-flags + #:search-paths ',(map search-path-specification->sexp + search-paths) + #: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 gerbil-build-system + (build-system + (name 'gerbil) + (description "The standard Gerbil build system") + (lower lower))) diff --git a/guix/build/gerbil-build-system.scm b/guix/build/gerbil-build-system.scm new file mode 100644 index 0000000000..4355d8e444 --- /dev/null +++ b/guix/build/gerbil-build-system.scm @@ -0,0 +1,78 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Xinglu Chen +;;; +;;; 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 gerbil-build-system) + #:use-module ((guix build gnu-build-system) #:prefix gnu:) + #:use-module (guix build union) + #:use-module (guix build utils) + #:use-module (srfi srfi-26) + #:export (%standard-phases + gerbil-build)) + +;;; Commentary: +;;; +;;; Build-side code for building Gerbil packages. +;;; +;;; Something to note is that there is no standard way to run tests +;;; for Gerbil packages, so there is not `check' phase by default. +;;; +;;; Code: + +(define (gerbil-package? name) + "Whether NAME is a Gerbil package." + (string-prefix? "gerbil-" name)) + +(define (gerbil-load-path inputs) + "Given an alist of inputs, INPUTS, return a list of directories to add +to the GERBIL_LOADPTH environment variable." + (let* ((labels (map car inputs)) + (gerbil-packages (filter gerbil-package? labels))) + (map (cut string-append <> "/lib/gerbil") + gerbil-packages))) + +(define* (setup-gerbil-environment #:key inputs #:allow-other-keys) + ;; This is where the compiled modules will end up. + (setenv "GERBIL_PATH" (string-append (getcwd) "/.build")) + ;; Where to look for other Gerbil modules. + (setenv "GERBIL_LOADPATH" (string-join (gerbil-load-path inputs) ":"))) + +(define* (build #:key build-flags #:allow-other-keys) + ;; The build.ss script contians the build instructions. + (apply invoke "./build.ss" build-flags)) + +(define* (install #:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/lib/gerbil")) + (copy-recursively ".build/lib" (string-append out "/lib/gerbil")) + (copy-recursively ".build/bin" (string-append out "/bin")))) + +(define %standard-phases + (modify-phases gnu:%standard-phases + (delete 'bootstrap) + (delete 'configure) + (add-after 'unpack 'setup-gerbil-environment setup-gerbil-environment) + (replace 'build build) + (delete 'check) + (replace 'install install))) + +(define* (gerbil-build #:key (phases %standard-phases) + #:allow-other-keys #:rest args) + "Build the given Gerbil packages, applying all of PHASES in order." + (apply gnu:gnu-build #:phases phases args)) + + From patchwork Thu Aug 5 14:10:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 31845 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 28DF627BC78; Thu, 5 Aug 2021 15:21:41 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E106D27BC6B for ; Thu, 5 Aug 2021 15:21:40 +0100 (BST) Received: from localhost ([::1]:39558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBeFg-0001xI-06 for patchwork@mira.cbaines.net; Thu, 05 Aug 2021 10:21:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBe5O-0004hS-Fg for guix-patches@gnu.org; Thu, 05 Aug 2021 10:11:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBe5O-0000sv-8e for guix-patches@gnu.org; Thu, 05 Aug 2021 10:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBe5O-00077M-3m for guix-patches@gnu.org; Thu, 05 Aug 2021 10:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49889] [PATCH 4/5] gnu: Add gerbil-srfi-54. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Aug 2021 14:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49889 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49889@debbugs.gnu.org Received: via spool by 49889-submit@debbugs.gnu.org id=B49889.162817262727300 (code B ref 49889); Thu, 05 Aug 2021 14:11:02 +0000 Received: (at 49889) by debbugs.gnu.org; 5 Aug 2021 14:10:27 +0000 Received: from localhost ([127.0.0.1]:47994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe4p-00076G-Gg for submit@debbugs.gnu.org; Thu, 05 Aug 2021 10:10:27 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:32882 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe4o-00075r-3b for 49889@debbugs.gnu.org; Thu, 05 Aug 2021 10:10:26 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1628172618; bh=dewwxMj3nSsJ5YUPhhXsWSHejS6sERSVu48RnDYHvCk=; h=From:To:Subject:In-Reply-To:References:Date; b=oDfEE0PRBwrz8LUAH1nnnLMHCBVdbtkq5LpmIVEsOikNmfV4uOmyfLDh+7T/Co82T MqS7mTsugCYiOdqTGwDLqAq5ZygMRlqbdlPKrvivaquWMnLRXy8PXL3M6QDrrDjrr5 R9TTeCPZoeZGVPvI7qSlvxM7V7YkbmsqJP8pm5DM= In-Reply-To: References: Message-Id: Date: Thu, 05 Aug 2021 16:10:18 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gerbil.scm (gerbil-srfi-54): New variable. --- gnu/packages/gerbil.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/gerbil.scm b/gnu/packages/gerbil.scm index 90559e9ea2..aee5da60cd 100644 --- a/gnu/packages/gerbil.scm +++ b/gnu/packages/gerbil.scm @@ -139,3 +139,28 @@ is that Gerbil modules are single instantiation, supporting high performance ahe time compilation and compiled macros.") (home-page "https://cons.io") (license (list license:lgpl2.1 license:asl2.0)))) + +(define-public gerbil-srfi-54 + ;; No releases; commit from 2019-01-13. + (let ((commit "a7db045ad3f150b5dde79c3320c34d8ac3589525") + (revision "0")) + (package + (name "gerbil-srfi-54") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hckiang/srfi-54") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0k1ddfhvbmf9njxm1ybs61n9kpzjvha2j63mf756r7b3x5rk51b0")))) + (build-system gerbil-build-system) + (home-page "https://github.com/hckiang/srfi-54") + (synopsis "SRFI-54 for Gerbil Scheme") + (description "This package provides SRFI-54 for Gerbil Scheme. +The implementation is exactly the same as the +@uref{https://srfi.schemers.org/srfi-54/srfi-54.html, official +reference documentation}.") + (license license:lgpl3+)))) From patchwork Thu Aug 5 14:10:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 31842 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A41D327BC78; Thu, 5 Aug 2021 15:14:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6AA1227BC6B for ; Thu, 5 Aug 2021 15:14:51 +0100 (BST) Received: from localhost ([::1]:48250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBe94-0005Th-Fv for patchwork@mira.cbaines.net; Thu, 05 Aug 2021 10:14:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBe5P-0004jf-Ap for guix-patches@gnu.org; Thu, 05 Aug 2021 10:11:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBe5P-0000tC-35 for guix-patches@gnu.org; Thu, 05 Aug 2021 10:11:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBe5O-00077T-Hv for guix-patches@gnu.org; Thu, 05 Aug 2021 10:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49889] [PATCH 5/5] gnu: Add gerbil-clojerbil. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Aug 2021 14:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49889 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49889@debbugs.gnu.org Received: via spool by 49889-submit@debbugs.gnu.org id=B49889.162817263327318 (code B ref 49889); Thu, 05 Aug 2021 14:11:02 +0000 Received: (at 49889) by debbugs.gnu.org; 5 Aug 2021 14:10:33 +0000 Received: from localhost ([127.0.0.1]:47997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe4u-00076Y-Pf for submit@debbugs.gnu.org; Thu, 05 Aug 2021 10:10:33 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:32892 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBe4s-000768-G6 for 49889@debbugs.gnu.org; Thu, 05 Aug 2021 10:10:30 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1628172623; bh=3EyrC9j5xwcwkwLX8ReobrIZ0X2q7mPao/gokNShK4s=; h=From:To:Subject:In-Reply-To:References:Date; b=VslE906sgP3aexy7lfLr3ITG4fMLu+vdBzQbLbyGdVwxgPStcZihewVawnzssZhFA mWWrxXhkT3uw26ojaSlX2IpR+zlfURzCD0bWySZ1wqXpctBPLjx5kidujk+f8gi1Rn bnDIlnGUIcFzp3JhAR2Mi472CsQRyU4yCAdkyqHs= In-Reply-To: References: Message-Id: <771dac2950d0b1b092a34a3332ab2162c39c0e1e.1628172101.git.public@yoctocell.xyz> Date: Thu, 05 Aug 2021 16:10:22 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gerbil.scm (gerbil-clojerbil): New variable. --- gnu/packages/gerbil.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/gerbil.scm b/gnu/packages/gerbil.scm index aee5da60cd..d254b39eff 100644 --- a/gnu/packages/gerbil.scm +++ b/gnu/packages/gerbil.scm @@ -164,3 +164,36 @@ The implementation is exactly the same as the @uref{https://srfi.schemers.org/srfi-54/srfi-54.html, official reference documentation}.") (license license:lgpl3+)))) + +(define-public gerbil-clojerbil + ;; No releases; commit from 2021-05-24 + (let ((commit "542f0d2cf0afb1d99ded76dee1f646e4d10efeb2") + (revision "0")) + (package + (name "gerbil-clojerbil") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/eraserhd/clojerbil") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1jipcmqhg9l2zi7bnbki5wky89i5xpd1ixnmyw2lm660i3p0gib4")))) + (build-system gerbil-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'build 'check + (lambda* (#:key inputs #:allow-other-keys) + (let ((gerbil (assoc-ref inputs "gerbil"))) + (invoke (string-append gerbil "/bin/gxi") "run-tests.ss"))))))) + (home-page "https://github.com/eraserhd/clojerbil") + (synopsis "Thin implementation of Clojure on top of Gerbil Scheme") + (description + "Clojerbil is a deliberately thin implementation of Clojure on top of +Gerbil Scheme. Its intent is to add Clojure-type niceties on top of Gerbil and +allow simple Clojure code to work without making a complicated compatibility +layer.") + (license license:unlicense))))