From: Tim Johann <t1m@phrogstar.de>
To: 65313@debbugs.gnu.org
Cc: Tim Johann <t1m@phrogstar.de>, maxim.cournoyer@gmail.com
Subject: [bug#65313] [PATCH v2] * gnu/packages/erlang.scm (erlang-lfe): New variable.
Date: Wed, 6 Sep 2023 22:57:53 +0200 [thread overview]
Message-ID: <43d67dfca58a7dd9384f5c566a50f3f647ce23ab.1694033873.git.t1m@phrogstar.de> (raw)
In-Reply-To: <cover.1692105836.git.t1m@phrogstar.de>
---
gnu/packages/erlang.scm | 72 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index a7f161647b..b0ad4ea2a7 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -27,6 +27,7 @@
(define-module (gnu packages erlang)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix build-system gnu)
#:use-module (guix build-system emacs)
#:use-module (guix build-system rebar)
@@ -738,3 +739,74 @@ (define-public rebar3-proper
(description "This plugin allows running PropEr test suites from within
rebar3.")
(license license:bsd-3)))
+
+(define-public erlang-lfe
+ (package
+ (name "erlang-lfe")
+ (version "2.1.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lfe/lfe")
+ (commit "v2.1.2")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "180hz1p2v3vb6yyzcfwircmljlnd86ln8z80lzy3mwlyrcxblvxy"))))
+ (build-system gnu-build-system)
+ (native-inputs (list rebar3 rebar3-proper erlang-proper))
+ (propagated-inputs (list erlang))
+ (arguments
+ (list
+ #:modules '((ice-9 ftw)
+ (srfi srfi-26)
+ (guix build gnu-build-system)
+ (guix build utils))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ ;; The following is inspired by rebar-build-system.scm
+ (add-before 'check 'erlang-depends
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define input-directories
+ (list #$(this-package-native-input "rebar3-proper")
+ #$(this-package-native-input "erlang-proper")))
+ (mkdir-p "_checkouts")
+ (for-each
+ (lambda (input-dir)
+ (let ((elibdir (string-append input-dir "/lib/erlang/lib")))
+ (when (directory-exists? elibdir)
+ (for-each
+ (lambda (dirname)
+ (let ((src (string-append elibdir "/" dirname))
+ (dest (string-append "_checkouts/" dirname)))
+ (when (not (file-exists? dest))
+ ;; symlinking will not work, since rebar3 will
+ ;; try to overwrite the _build directory several
+ ;; times with the contents of _checkout, so we
+ ;; copy the directory tree to _checkout and make
+ ;; it writeable.
+ (copy-recursively src dest #:follow-symlinks? #t)
+ (for-each (cut chmod <> #o777) (find-files dest)))))
+ (scandir elibdir (lambda (file)
+ (and (not (member file '("." "..")))
+ (file-is-directory?
+ (string-append elibdir
+ "/"
+ file)))))))))
+ input-directories)))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (begin
+ (setenv "REBAR_CACHE_DIR" "/tmp")
+ (invoke "make" "-j" "tests"))))))
+ #:make-flags
+ #~(list (string-append "PREFIX=" #$output) "CC=gcc")))
+ (home-page "https://github.com/lfe/lfe")
+ (synopsis "Lisp Flavoured Erlang")
+ (description
+ "LFE, Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlang
+compiler. Code produced with it is compatible with \"normal\" Erlang
+ code. An LFE evaluator and shell is also included.")
+ (license license:asl2.0)))
base-commit: 65dcfb3f3865d08467da747041263fd22460d393
--
2.41.0
next prev parent reply other threads:[~2023-09-06 20:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 15:23 [bug#65313] [PATCH 0/1] gnu: Add erlang-lfe Tim Johann
2023-08-15 15:27 ` [bug#65313] [PATCH 1/1] * gnu/packages/erlang.scm (erlang-lfe): New variable Tim Johann
2023-09-05 13:41 ` [bug#65313] [PATCH 0/1] gnu: Add erlang-lfe Maxim Cournoyer
2023-09-06 15:53 ` Tim Johann
2023-09-06 17:21 ` Maxim Cournoyer
2023-09-06 20:57 ` Tim Johann [this message]
2023-09-07 2:32 ` bug#65313: [PATCH v2] * gnu/packages/erlang.scm (erlang-lfe): New variable Maxim Cournoyer
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43d67dfca58a7dd9384f5c566a50f3f647ce23ab.1694033873.git.t1m@phrogstar.de \
--to=t1m@phrogstar.de \
--cc=65313@debbugs.gnu.org \
--cc=maxim.cournoyer@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.