diff mbox series

[bug#54796,v3,13/22] gnu: Add erlang-relx.

Message ID 64926e421fb4145966cc13c57869d13ebf33a1d2.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-relx): New variable.
---
 gnu/packages/erlang.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

M April 9, 2022, 11:43 a.m. UTC | #1
Hartmut Goebel schreef op vr 08-04-2022 om 19:03 [+0200]:
> +    (description "Relx assembles releases for an Erlang/OTP release.  Given a

What does ‘Erlang/OTP’ mean here?  Is it like "make dist", or more like
"cargo publish", or "git tag v1.2.3"?

Greetings,
MAxime.
M April 9, 2022, 11:45 a.m. UTC | #2
Hartmut Goebel schreef op vr 08-04-2022 om 19:03 [+0200]:
> +    (propagated-inputs
> +     (list erlang-bbmustache))

erlang-relx looks like some kind of tool that can be run and not a
library.  As such, does it belong in erlang.scm or package-
management.scm?  Does the input need to be propagated?  Can the
'erlang-' prefix be dropped?

Greetings,
Maxime.
Hartmut Goebel April 9, 2022, 3:18 p.m. UTC | #3
Am 09.04.22 um 13:45 schrieb Maxime Devos:
> erlang-relx looks like some kind of tool that can be run and not a
> library. … Can the 'erlang-' prefix be dropped?

The github repo says: „|relx| is a library used by rebar3“. Thus I'd 
keep the „erlang-“ prefix.

> Does the input need to be propagated?

AFAIK: Like for Python, run-time dependencies of Erlang *libraries* need 
to be propagated. Erlang does not actually have a notion of „library“. 
It's more like Rust where all all dependent sources are expected to be 
available at build-time and then put into the „executable“. Basically 
this is statically linked, so only developers/package-builders are 
effected by this propagation.

Would be great if some experienced Erlang developer would show up and 
show a solution without needing to propagate.
Hartmut Goebel April 9, 2022, 3:32 p.m. UTC | #4
Am 09.04.22 um 13:43 schrieb Maxime Devos:
> Hartmut Goebel schreef op vr 08-04-2022 om 19:03 [+0200]:
>> +    (description "Relx assembles releases for an Erlang/OTP release.  Given a
> What does ‘Erlang/OTP’ mean here?  Is it like "make dist", or more like
> "cargo publish", or "git tag v1.2.3"?

OTP is a collection of middleware, libraries, and tools written in 
Erlang programming language (Wikipedia, 
https://en.wikipedia.org/wiki/Open_Telecom_Platform). AFAIU it's much 
like the Java run-time engine plus libraries.

So „Erlang/OTP” is a standing term in the Erlang and Elixir world. Thus 
I would keep it, expecting that Erlang developers understand this.

I can't explain what this library does — all I know is: it's a 
dependency of rebar3.
diff mbox series

Patch

diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index a7e63db0f3..626043a1b5 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -423,6 +423,28 @@  Erlang.")
     (description "This package provides an Erlang providers library.")
     (license license:asl2.0)))
 
+(define-public erlang-relx
+  (package
+    (name "erlang-relx")
+    (version "4.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (hexpm-uri "relx" version))
+       (sha256
+        (base32 "02gmfx1vxg9m3mq4njsqhs4972l4nb8m5p1pdcf64g09ccf17y1g"))))
+    (build-system rebar3-build-system)
+    (propagated-inputs
+     (list erlang-bbmustache))
+    (home-page "https://erlware.github.io/relx/")
+    (synopsis "Release assembler for Erlang/OTP Releases")
+    (description "Relx assembles releases for an Erlang/OTP release.  Given a
+release specification and a list of directories in which to search for OTP
+applications it will generate a release output.  That output depends heavily on
+what plugins available and what options are defined, but usually it is simply
+a well configured release directory.")
+    (license license:asl2.0)))
+
 (define-public erlang-ssl-verify-fun
   (package
     (name "erlang-ssl-verify-fun")