From mboxrd@z Thu Jan 1 00:00:00 1970 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 Subject: [bug#37411] [PATCH] gnu: Add fennel. Resent-Message-ID: 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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 37411@debbugs.gnu.org --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-fennel.patch Content-Transfer-Encoding: quoted-printable >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 =3D \ %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 =C2=A9 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))) --=20 2.23.0 --=-=-=--