From patchwork Sun Sep 15 17:29:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex ter Weele X-Patchwork-Id: 15378 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 05F8E173CF; Sun, 15 Sep 2019 18:30:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 95DCB173CE for ; Sun, 15 Sep 2019 18:30:11 +0100 (BST) Received: from localhost ([::1]:56180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9YLi-0000Qk-R9 for patchwork@mira.cbaines.net; Sun, 15 Sep 2019 13:30:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57712) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9YLc-0000Qb-Ux for guix-patches@gnu.org; Sun, 15 Sep 2019 13:30:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9YLb-00009e-KJ for guix-patches@gnu.org; Sun, 15 Sep 2019 13:30:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39871) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9YLb-00009W-Gp for guix-patches@gnu.org; Sun, 15 Sep 2019 13:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i9YLb-0007UN-BD for guix-patches@gnu.org; Sun, 15 Sep 2019 13:30:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37411] [PATCH] gnu: Add fennel. Resent-From: Alex ter Weele Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Sep 2019 17:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37411 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37411@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156856857128699 (code B ref -1); Sun, 15 Sep 2019 17:30:03 +0000 Received: (at submit) by debbugs.gnu.org; 15 Sep 2019 17:29:31 +0000 Received: from localhost ([127.0.0.1]:48692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9YL4-0007Sp-L2 for submit@debbugs.gnu.org; Sun, 15 Sep 2019 13:29:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:52997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9YL2-0007Sh-0U for submit@debbugs.gnu.org; Sun, 15 Sep 2019 13:29:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57632) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9YL0-0000ND-JJ for guix-patches@gnu.org; Sun, 15 Sep 2019 13:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9YKz-0008Oo-AD for guix-patches@gnu.org; Sun, 15 Sep 2019 13:29:26 -0400 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:41036) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9YKz-0008OX-2X for guix-patches@gnu.org; Sun, 15 Sep 2019 13:29:25 -0400 Received: by mail-io1-xd34.google.com with SMTP id r26so73355024ioh.8 for ; Sun, 15 Sep 2019 10:29:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=zMRYrKsaz+aTCAVqD/BzVPgCKX9bhSGJa8SiF4sao0c=; b=HLjM3Sc7lvR5EvtfAwnisURzYfYVR32scUXEtyixTd6/dpSXJ02GsYTqcRxE347fj5 xxmPNCGf97yiaiMjIfUZD9F4ORwq1jw5qHDb1yToTYGy0rPLE9BYdSp5bTl9iQZESX7+ ClkttWUTPUOwUnkJtmbtQiDaMC8QkdYTY6aOKvgDFj5InD4btXdJIJayHBsbrXGI9XFd GZRakBaZ+WLbtr7V+h1fHyr10eMMaXNLLxKvr1tT29FkXiCGEzLxFcnnX613xwAxvYv+ CSSpxQb1cLvODWE8otUtKie0SFC4832g5gcoO9StRj77saDeD9nBLTdeyLdxKdQXZR4l cu4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=zMRYrKsaz+aTCAVqD/BzVPgCKX9bhSGJa8SiF4sao0c=; b=i6X1GhYXOzxCK23dLqKRacFq57IdhNYhbswozYeLo2Oe/uZFkKtFzoGEew+vePSR6o THGuOqBEX10l5UTOqUw8Z7AMVHFnk+CXefW76+COUrX2VgmTXKHB/4zcKYK7RFi2LnJQ jFQngf7zS2a9OUvJ5g2djRfnxIcGMDcnUN24G5kpCCHoL97YK6CJXwh5Kx6BEXZsg36g 8pJXLXkLGFIr4b2DvKaj5OtUgvwOl26pTLBhkGZS9soPJ0UNhkhq0gcwx7RTRn9BTnDV LA/B+5WS/TdPqUzCbUEdSqao5uWK1pA/F8lJg/fyQGBjed15W2Icw0Yj6ss6GOhn5m5q sSyA== X-Gm-Message-State: APjAAAVWHPBWFes3Z8OfDhRggjwg0D+37K/cWK3sC6njMydJnfh0IjlZ wq71+fGFqO/kJcHpwqilNeRf7ZgStzE= X-Google-Smtp-Source: APXvYqwM95CPX/MQ8+1JcSTg7pc0vRTBGyKlaSJaPOSOKfZcmhGAqApyPPEvabiGt7xo8XlJZjh6/Q== X-Received: by 2002:a6b:f311:: with SMTP id m17mr10775489ioh.0.1568568563421; Sun, 15 Sep 2019 10:29:23 -0700 (PDT) Received: from librem (c-73-22-1-166.hsd1.il.comcast.net. [73.22.1.166]) by smtp.gmail.com with ESMTPSA id h3sm24969437iol.73.2019.09.15.10.29.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Sep 2019 10:29:22 -0700 (PDT) From: Alex ter Weele X-Google-Original-From: Alex ter Weele Date: Sun, 15 Sep 2019 12:29:21 -0500 Message-ID: <87y2yppixa.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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 Some limitations: (require "fennelview") – i.e. requiring the library distributed with the language – does not work. I spoke with members of freenode's #fennel and a FENNEL_PATH could be added. In a future package definition, wrap-program would set that variable. In the meantime, this can be worked around: fennel --add-fennel-path "$(guix build fennel )/share/?.fnl" No native readline support. I have decided not to package https://luarocks.org/modules/peterbillam/readline as fennel 0.2.1's use of readline does not give more functionality than rlwrap. From 08efecbbd181cc7db0c008b9740bc95ea2f78472 Mon Sep 17 00:00:00 2001 From: Alex ter Weele Date: Sat, 7 Sep 2019 16:18:38 -0500 Subject: [PATCH] gnu: Add fennel. * gnu/packages/fennel.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add fennel.scm. --- gnu/local.mk | 1 + gnu/packages/fennel.scm | 62 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 gnu/packages/fennel.scm diff --git a/gnu/local.mk b/gnu/local.mk index b7a5ef825b..84bfc8df2c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -176,6 +176,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/erlang.scm \ %D%/packages/fabric-management.scm \ %D%/packages/fcitx.scm \ + %D%/packages/fennel.scm \ %D%/packages/figlet.scm \ %D%/packages/file.scm \ %D%/packages/file-systems.scm \ diff --git a/gnu/packages/fennel.scm b/gnu/packages/fennel.scm new file mode 100644 index 0000000000..a5c8ba756d --- /dev/null +++ b/gnu/packages/fennel.scm @@ -0,0 +1,62 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Alex ter Weele + +(define-module (gnu packages fennel) + #:use-module (gnu packages lua) + #:use-module (guix packages) + #:use-module (guix build-system gnu) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public fennel + (package + (name "fennel") + (version "0.2.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bakpakin/Fennel.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1yn2lyfcrsjcx60lxy0xcyl2rfk4r5pydbkcblpikpk6vhr10ws0")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (data (string-append out "/share/")) + (bin (string-append out "/bin/"))) + (copy-recursively (assoc-ref %build-inputs "source") data) + (install-file "fennel" bin) + (wrap-program (string-append bin "fennel") + `("LUA_PATH" ":" prefix (,(string-append data "?.lua")))))))))) + (inputs + `(("lua" ,lua))) + (home-page "https://fennel-lang.org/") + (synopsis "Lua lisp language") + (description "Fennel is a programming language that brings together the +speed, simplicity, and reach of Lua with the flexibility of a lisp syntax and +macro system. + + * Full Lua compatibility: Easily call any Lua function or library from +Fennel and vice-versa. + + * Zero overhead: Compiled code should be just as or more efficient than +hand-written Lua. + + * Compile-time macros: Ship compiled code with no runtime dependency on +Fennel. + + * Embeddable: Fennel is a one-file library as well as an executable. +Embed it in other programs to support runtime extensibility and interactive +development. + +Anywhere you can run Lua code, you can run Fennel code.") + (license license:x11))) -- 2.23.0