diff mbox series

[bug#42180,08/22] gnu: Add erlang-bbmustache.

Message ID 015e24c854cee14aa771a00a2fb6e3f944e39174.1593797694.git.h.goebel@crazy-compilers.com
State New
Headers show
Series Add extracting download, importer for hex.pm and rebar3 build-system for Erlang | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Hartmut Goebel July 3, 2020, 5:43 p.m. UTC
* gnu/packages/erlang.scm (erlang-bbmustache): New variable.
---
 gnu/packages/erlang.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index f874e605b9..fbc2025efe 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -235,6 +235,41 @@  built-in support for concurrency, distribution and fault tolerance.")
 files.")
     (license license:asl2.0)))
 
+(define-public erlang-bbmustache
+  (package
+    (name "erlang-bbmustache")
+    (version "1.10.0")
+    (source
+     (origin
+       (method hexpm-fetch)
+       (uri (hexpm-uri "bbmustache" version))
+       (sha256
+        (base32 "0dpvi5qyx5kavi88p15501q939yf4dz3xqyc7mpi255rgmhsfnqx"))))
+    (build-system rebar3-build-system)
+    (inputs
+     `(("erlang-edown" ,erlang-edown)
+       ("erlang-getopt" ,erlang-getopt)
+       ("erlang-rebar3-git-vsn" ,erlang-rebar3-git-vsn)))
+    (arguments
+     `(#:tests? #f ;; requires mustache specification file
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'build-escript
+           (lambda _
+             (invoke "rebar3" "as" "dev" "escriptize")
+             #t))
+         (add-after 'install 'install-escript
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               (install-file "_build/dev/bin/bbmustache"
+                             (string-append out "/bin")))
+             #t)))))
+    (home-page "https://github.com/soranoba/bbmustache/")
+    (synopsis "Binary pattern match Based Mustache template engine for Erlang")
+    (description "This Erlang library provides a Binary pattern match Based
+Mustache template engine")
+    (license license:expat)))
+
 (define-public erlang-certifi
   (package
     (name "erlang-certifi")