diff mbox series

[bug#54796,v3,06/22] gnu: Add erlang-bbmustache.

Message ID 79b9e17d9908b8b0b2d432e05b072d218f2e3f0c.1649436566.git.h.goebel@crazy-compilers.com
State Accepted
Headers show
Series Add importer for hex.pm and rebar3 build-system for Erlang | expand

Commit Message

Hartmut Goebel April 8, 2022, 5:03 p.m. UTC
* gnu/packages/erlang.scm (erlang-bbmustache): New variable.
---
 gnu/packages/erlang.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index faf6509a4e..1682521ca1 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -206,6 +206,38 @@  built-in support for concurrency, distribution and fault tolerance.")
 files.")
     (license license:asl2.0)))
 
+(define-public erlang-bbmustache
+  (package
+    (name "erlang-bbmustache")
+    (version "1.12.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (hexpm-uri "bbmustache" version))
+       (sha256
+        (base32 "0fvvaxdpziygxl30j59g98qkh2n47xlb7w5dfpsm2bfcsnj372v8"))))
+    (build-system rebar3-build-system)
+    (inputs
+     (list erlang-getopt rebar3-git-vsn
+           erlang-edown))  ; for building the docs
+    (arguments
+     `(#:tests? #f ;; requires mustache specification file
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'build-more
+           (lambda _
+             (invoke "rebar3" "as" "dev" "escriptize")))
+         (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"))))))))
+    (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")