unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex ter Weele <alex.ter.weele@gmail.com>
To: 37411@debbugs.gnu.org
Subject: [bug#37411] [PATCH] gnu: Add fennel.
Date: Sun, 15 Sep 2019 12:29:21 -0500	[thread overview]
Message-ID: <87y2yppixa.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> (raw)

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

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.


[-- Attachment #2: 0001-gnu-Add-fennel.patch --]
[-- Type: text/x-patch, Size: 3463 bytes --]

From 08efecbbd181cc7db0c008b9740bc95ea2f78472 Mon Sep 17 00:00:00 2001
From: Alex ter Weele <alex.ter.weele@gmail.com>
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 <alex.ter.weele@gmail.com>
+
+(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


             reply	other threads:[~2019-09-15 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-15 17:29 Alex ter Weele [this message]
2019-09-23  1:37 ` [bug#37411] [PATCH] gnu: Add fennel Alex ter Weele
2019-09-24 11:34   ` 宋文武
2019-10-01 21:17   ` Ludovic Courtès
2019-11-19  9:39     ` Ludovic Courtès
2019-11-19 13:51       ` Alex ter Weele
2023-05-28 21:31         ` bug#37411: " Jelle Licht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2yppixa.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me \
    --to=alex.ter.weele@gmail.com \
    --cc=37411@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).