From patchwork Mon Sep 23 01:37:46 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: 15438 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 8A21B17410; Mon, 23 Sep 2019 02:38:11 +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 393D01740E for ; Mon, 23 Sep 2019 02:38:11 +0100 (BST) Received: from localhost ([::1]:51652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCDIo-0006so-Ms for patchwork@mira.cbaines.net; Sun, 22 Sep 2019 21:38:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57290) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCDIi-0006sg-4P for guix-patches@gnu.org; Sun, 22 Sep 2019 21:38:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCDIg-0001v9-GS for guix-patches@gnu.org; Sun, 22 Sep 2019 21:38:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iCDIg-0001v3-8x for guix-patches@gnu.org; Sun, 22 Sep 2019 21:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iCDIg-0004rO-1a for guix-patches@gnu.org; Sun, 22 Sep 2019 21:38:02 -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: Mon, 23 Sep 2019 01:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37411 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37411@debbugs.gnu.org Received: via spool by 37411-submit@debbugs.gnu.org id=B37411.156920267818670 (code B ref 37411); Mon, 23 Sep 2019 01:38:01 +0000 Received: (at 37411) by debbugs.gnu.org; 23 Sep 2019 01:37:58 +0000 Received: from localhost ([127.0.0.1]:34739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCDIc-0004r4-Fq for submit@debbugs.gnu.org; Sun, 22 Sep 2019 21:37:58 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:37960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCDIa-0004qm-3s for 37411@debbugs.gnu.org; Sun, 22 Sep 2019 21:37:56 -0400 Received: by mail-io1-f68.google.com with SMTP id u8so8284882iom.5 for <37411@debbugs.gnu.org>; Sun, 22 Sep 2019 18:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=K1sJ7FqzoapIbZdrCnY14S28oRSDaZ9oqnkymaTewq0=; b=PGtRbJkm2kVBOysoSmk9eGP4dA0dVLUwdY7VRnxfBD3MXt2ehBGn4082TrhSaMfyl8 Ry5Y3ighrTL+P6F3YyDBaDHR+XD7zJfh1I0aQjxoBYbaiQj1fIcYo5xjfDFMbL7mXkd6 9uBhKNAUGssHSIJ8EQ1+8BZ0aT6cJHnidf2hmFNeBvQFqLME5pLJQVzRc+A14EiO84Gh jMCE9A1ht+ZDgOFnC/nr4A4cZLhwyIWNvkHKhHo7e2Qe0Ratb3RNXr9BoYP/yVrcwlC5 xNFy9ZcXTGrQeMkLt0aEWTXI3y6ESr+fQnfE3z9WVFne/nIY0QPc9yJzkqcKOKI+bupO 635A== 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:references:date:in-reply-to :message-id:user-agent:mime-version; bh=K1sJ7FqzoapIbZdrCnY14S28oRSDaZ9oqnkymaTewq0=; b=f7aVYUo/wBo56xD5//CtkG1CKt7Ar4uLzoZmivZAENbTvkgxd5lNuwTrCJT0gmcBW1 1vMQoDa+IVdw1wN4JsrJ72nqd5r1qs75Pol9uH9ezELkwQq9mT6oKFYJed9jaSqdlVYz 9lwDufOh0H/qVnrtWe/DFY8BjIYKYQ/oLVo13zgnwOTAyAbFYngmOKsomOfU5UbMVfny QmPxl2/GbtuT7hAJfEPLCFY3ZjJSLmIdmQRBiKYzOYXZv5gBrRHnhna+331uw3o7hBy9 gs/LZfElbVePLv3KDS6K9SOY3xj2mzbDnEhTPRumU6QjTtQuYGU9BJaYd7kq+E7bBJ1i otHQ== X-Gm-Message-State: APjAAAWtff4mea0oyGhmRrlKj41i/ivID4iZyHN4fToYjlrDM7XWxrc0 FbHx5jE1K4IzN4tJUdQ+GHvmKMHR7Oo= X-Google-Smtp-Source: APXvYqzJQtyXW6FLZGZHdUu/quBgNdBZPJu7xTyWEd1tc1JyNaQzolhAeinWeixWpI98q/yXB9Cp9g== X-Received: by 2002:a6b:c7c2:: with SMTP id x185mr20589797iof.224.1569202668737; Sun, 22 Sep 2019 18:37:48 -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 g4sm28624433iof.56.2019.09.22.18.37.47 for <37411@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2019 18:37:47 -0700 (PDT) From: Alex ter Weele X-Google-Original-From: Alex ter Weele References: <87y2yppixa.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> Date: Sun, 22 Sep 2019 20:37:46 -0500 In-Reply-To: <87y2yppixa.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> (Alex ter Weele's message of "Sun, 15 Sep 2019 12:29:21 -0500") Message-ID: <874l13ztat.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 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 fennel 0.3.0 just released. Below is an updated patch. The new release includes FENNEL_PATH, which is now populated by the package definition, so (require "fennelview") now works, addressing a shortcoming of the previous patch. The new release also includes completion via readline, which is not supported in this package definition. For that reason, I would consider this patch WIP. From 5156cfff4e0e9c8b7223213ab28c891c97641e6c 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 | 63 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 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..0bce77fa66 --- /dev/null +++ b/gnu/packages/fennel.scm @@ -0,0 +1,63 @@ +;;; 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.3.0") + (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 + "1d5kzgb9l2gdya1jqvp4ni03rd8v270fbhy5wxkjbhr9xf2xb14k")))) + (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"))) + `("FENNEL_PATH" ";" prefix (,(string-append data "?.fnl")))))))))) + (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