From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8JDVCEy/7F4tYAAA0tVLHw (envelope-from ) for ; Fri, 19 Jun 2020 13:36:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ONW2BEy/7F7vDwAA1q6Kng (envelope-from ) for ; Fri, 19 Jun 2020 13:36:12 +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 9A644940667 for ; Fri, 19 Jun 2020 13:36:11 +0000 (UTC) Received: from localhost ([::1]:46336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmHBi-0000kI-Eb for larch@yhetil.org; Fri, 19 Jun 2020 09:36:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmHBa-0000jF-K6 for guix-patches@gnu.org; Fri, 19 Jun 2020 09:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmHBa-0006QJ-AB for guix-patches@gnu.org; Fri, 19 Jun 2020 09:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jmHBa-0000G0-6f for guix-patches@gnu.org; Fri, 19 Jun 2020 09:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41949] [PATCH 1/5] gnu: Add gerbil References: <875zbn2o5i.fsf@alice.lan> In-Reply-To: <875zbn2o5i.fsf@alice.lan> Resent-From: Edouard Klein Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Jun 2020 13:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41949 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 41949@debbugs.gnu.org Received: via spool by 41949-submit@debbugs.gnu.org id=B41949.1592573747959 (code B ref 41949); Fri, 19 Jun 2020 13:36:02 +0000 Received: (at 41949) by debbugs.gnu.org; 19 Jun 2020 13:35:47 +0000 Received: from localhost ([127.0.0.1]:55442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmHBK-0000FP-M2 for submit@debbugs.gnu.org; Fri, 19 Jun 2020 09:35:47 -0400 Received: from sender4-op-o11.zoho.com ([136.143.188.11]:17124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmHBI-0000FG-OD for 41949@debbugs.gnu.org; Fri, 19 Jun 2020 09:35:45 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1592573741; cv=none; d=zohomail.com; s=zohoarc; b=fRbcRk8/ihwGzeyMe7AsMZb98tpFPJjEInBV6vrZ24RiMS4s9ArN6zQ7RgiyU1i5PHE38+Ulo/d6f6YOaKT4Hg0rzLtT6vJsMpe1njcU9DAI78K+LPygdb57bDsyySNyrqwnIJL6fV/RjtfCGtuYWTtd851IR0WgESZPE5WAhRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592573741; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=2PwQPZ/rVsOcIdwD2K+tbVricNK38vscSxxVmYz66eY=; b=MyGf0jKv2IaOODnr7hyFCC6w8r1iov9LQJm0562cSyUUYKHXb8JCAeGn8e6l4oGLbZWUqLGlI59NWPohP2/OKgYzXhvqzM1jyZT88zC+cgIqBJQeLUlcEQvZRFNq0V+kcrVjVq9hsHqXVBNybTpm+VnkmlCWN9Y9zyUnjWZP90Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=beaver-labs.com; spf=pass smtp.mailfrom=edk@beaver-labs.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1592573741; s=zoho; d=beaver-labs.com; i=edk@beaver-labs.com; h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=2PwQPZ/rVsOcIdwD2K+tbVricNK38vscSxxVmYz66eY=; b=Sv3nMIaZ6YPTFbB1mVba+K7/pCGTQvfSUCNHtNuU3JgMr7vB/UIGIaoNT4PoIh1q YKLdY4gUOZxAc3OTnmXq0CGpRAZowAOkfpq4K/f7BjXTx8nzfha/cBEwnYseVwFiso3 z6OvZkx+WXSJxZw0ORBwEQkivB2iVouFEpuLKAEA= Received: from alice.lan (lfbn-idf1-1-1299-119.w90-79.abo.wanadoo.fr [90.79.23.119]) by mx.zohomail.com with SMTPS id 1592573740317946.8949582234115; Fri, 19 Jun 2020 06:35:40 -0700 (PDT) User-agent: mu4e 1.4.6; emacs 26.3 From: Edouard Klein Message-ID: <87366r2n6n.fsf@alice.lan> Date: Fri, 19 Jun 2020 15:35:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 2.0 (++) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: 1.0 (+) 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=beaver-labs.com header.s=zoho header.b=Sv3nMIaZ; dmarc=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: 1.99 X-TUID: 6BnfK4zHU5dB * 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 =C2=A9 2018 Adam Massmann ;;; Copyright =C2=A9 2018 Gabriel Hondet ;;; Copyright =C2=A9 2020 Pierre Neidhardt +;;; Copyright =C2=A9 2020 Edouard Klein ;;; ;;; 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 bs= d-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)) =20 @@ -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, insta= ll 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 ful= l-blown module +system, similar to PLT Scheme's (sorry, Racket) modules. The main differe= nce from Racket +is that Gerbil modules are single instantiation, supporting high performan= ce ahead of +time compilation and compiled macros.") + (home-page "https://cons.io") + (license `(,lgpl2.1 ,asl2.0)))) --=20 2.26.2