unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 42180@debbugs.gnu.org
Subject: [bug#42180] [PATCH 16/22] gnu: Add rebar3.
Date: Fri,  3 Jul 2020 19:43:41 +0200	[thread overview]
Message-ID: <5d19e5b88d46294bb4578110969328353adec0de.1593797694.git.h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <cover.1593797694.git.h.goebel@crazy-compilers.com>

* gnu/packages/erlang.scm (rebar3): New variable.
---
 gnu/packages/erlang.scm | 80 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 67c3415ec5..f4ceb096a3 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -493,3 +493,83 @@ a well configured release directory.")
     (description "This package provides SSL verification functions for
 Erlang.")
     (license license:expat)))
+
+(define-public rebar3
+  (package
+    (name "rebar3")
+    (version "3.13.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/erlang/rebar3.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "13fzi46h88mmcj4z4anr5fxz7383m1m36wzfv7z3qx9xhaxd5k64"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'bootstrap)
+         (add-after 'unpack 'unpack-dependency-sources
+           (lambda* (#:key inputs #:allow-other-keys)
+             (for-each
+              (lambda (pkgname)
+                (let* ((src (string-append pkgname "-source"))
+                       (input (assoc-ref inputs src))
+                       (checkouts-dir (string-append "_checkouts/" pkgname))
+                       (lib-dir (string-append "_build/default/lib/" pkgname)))
+                  ;; dependencies, fetched from hex.pm
+                  (mkdir-p checkouts-dir)
+                  (invoke "tar" "-xzf" input "-C" checkouts-dir)
+                  ;; (mkdir-p "lib/erlang/lib")
+                  ;; (copy-recursively (assoc-ref inputs src)
+                  ;;                   (string-append "lib/erlang/lib/" pkgname))
+                  ;; other type of dependencies
+                  (mkdir-p lib-dir)
+                  (copy-recursively checkouts-dir lib-dir)))
+              (list "bbmustache" "certifi" "cf" "cth_readable"
+                    "eunit_formatters" "getopt" "hex_core" "erlware_commons"
+                    "parse_trans" "relx" "ssl_verify_fun" "providers"))
+             #t))
+         (delete 'configure)
+         (replace 'build
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (invoke "./bootstrap")))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               (install-file "rebar3" (string-append out "/bin")))
+             #t))
+         (delete 'check))))
+    (native-inputs
+     `(("erlang" ,erlang)))
+    (inputs
+     `(("bbmustache-source" ,(package-source erlang-bbmustache))
+       ("certifi-source" ,(package-source erlang-certifi))
+       ("cf-source" ,(package-source erlang-cf))
+       ("cth_readable-source" ,(package-source erlang-cth-readable))
+       ("erlware_commons-source" ,(package-source erlang-erlware-commons))
+       ("eunit_formatters-source" ,(package-source erlang-eunit-formatters))
+       ("getopt-source" ,(package-source erlang-getopt))
+       ("hex_core-source" ,(package-source erlang-hex-core))
+       ("parse_trans-source" ,(package-source erlang-parse-trans))
+       ("relx-source" ,(package-source erlang-relx))
+       ("ssl_verify_fun-source" ,(package-source erlang-ssl-verify-fun))
+       ("providers-source" ,(package-source erlang-providers))
+       ))
+    (home-page "https://www.rebar3.org/")
+    (synopsis "Sophisticated build-tool for Erlang projects that follows OTP
+principles")
+    (description "@code{rebar3} is an Erlang build tool that makes it easy to
+compile and test Erlang applications, port drivers and releases.
+
+@code{rebar3} is a self-contained Erlang script, so it's easy to distribute or
+even embed directly in a project.  Where possible, rebar uses standard
+Erlang/OTP conventions for project structures, thus minimizing the amount of
+build configuration work.  @code{rebar3} also provides dependency management,
+enabling application writers to easily re-use common libraries from a variety
+of locations (git, hg, etc).")
+    (license license:asl2.0)))
-- 
2.21.3





  parent reply	other threads:[~2020-07-03 17:46 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 17:40 [bug#42180] [PATCH 00/22] Add extracting download, importer for hex.pm and rebar3 build-system for Erlang Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 01/22] guix: Add extracting-download Hartmut Goebel
2020-07-06  8:08   ` zimoun
2020-07-06  8:15     ` Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 02/22] guix: Add importer for hex.pm Hartmut Goebel
2020-11-02 14:18   ` [bug#42180] [PATCH 0/1] " pukkamustard
2020-11-02 14:18     ` [bug#42180] [PATCH 1/1] " pukkamustard
2020-07-03 17:43 ` [bug#42180] [PATCH 03/22] guix: Add rebar3 build-system Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 04/22] gnu: Add erlang-cf Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 05/22] gnu: Add erlang-certifi Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 06/22] gnu: Add erlang-erlware-commons Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 07/22] gnu: Add erlang-cth-readable Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 08/22] gnu: Add erlang-bbmustache Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 09/22] gnu: Add erlang-getopt Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 10/22] gnu: Add erlang-eunit-formatters Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 11/22] gnu: Add erlang-providers Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 12/22] gnu: Add erlang-parse-trans Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 13/22] gnu: Add erlang-hex-core Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 14/22] gnu: Add erlang-ssl-verify-fun Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 15/22] gnu: Add erlang-relx Hartmut Goebel
2020-07-03 17:43 ` Hartmut Goebel [this message]
2020-07-03 17:43 ` [bug#42180] [PATCH 17/22] gnu: Add erlang-edown Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 18/22] gnu: Add erlang-jsone Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 19/22] gnu: Add erlang-proper Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 20/22] gnu: Add erlang-rebar3-raw-deps Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 21/22] gnu: Add erlang-rebar3-git-vsn Hartmut Goebel
2020-07-03 17:43 ` [bug#42180] [PATCH 22/22] gnu: Add erlang-rebar3-proper Hartmut Goebel
     [not found] ` <handler.42180.B.159379803013215.ack@debbugs.gnu.org>
2021-01-22 20:20   ` [bug#42180] Acknowledgement ([PATCH 00/22] Add extracting download, importer for hex.pm and rebar3 build-system for Erlang) Hartmut Goebel
2021-10-06 15:20 ` [bug#42180] [PATCH v2 01/23] guix: Add extracting-download Hartmut Goebel
2021-10-06 15:20   ` [bug#42180] [PATCH v2 02/23] guix: Add importer for hex.pm Hartmut Goebel
2021-10-06 19:37     ` Maxime Devos
2021-10-06 20:23       ` Hartmut Goebel
2021-10-06 19:38     ` [bug#42180] [bug#51061] " Maxime Devos
2021-10-06 20:25       ` Hartmut Goebel
2021-10-07 22:01     ` [bug#42180] bug#51061: [PATCH v2 01/23] guix: Add extracting-download Ludovic Courtès
2021-10-06 15:20   ` [bug#42180] [PATCH v2 03/23] guix: Add rebar3 build-system Hartmut Goebel
2021-10-06 18:56     ` [bug#51061] " Maxime Devos
2021-10-06 20:27       ` [bug#42180] " Hartmut Goebel
2021-10-06 21:25         ` Maxime Devos
2021-10-06 21:36           ` Hartmut Goebel
2021-10-06 21:47             ` [bug#42180] " Maxime Devos
2021-10-07 20:57               ` Hartmut Goebel
2021-10-07 22:20                 ` [bug#51061] [PATCH v2 01/23] guix: Add extracting-download Ludovic Courtès
2021-10-08  9:49                   ` Hartmut Goebel
2021-10-09 13:16                     ` [bug#42180] bug#51061: " Ludovic Courtès
2021-10-08 20:25                   ` [bug#51061] " Hartmut Goebel
2021-10-07 22:09     ` [bug#42180] bug#51061: " Ludovic Courtès
2021-10-06 15:20   ` [bug#42180] [PATCH v2 04/23] gnu: Add erlang-cf Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 05/23] gnu: Add erlang-certifi Hartmut Goebel
2021-10-06 15:20   ` [bug#42180] [PATCH v2 06/23] gnu: Add erlang-erlware-commons Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 07/23] gnu: Add erlang-cth-readable Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 08/23] gnu: Add erlang-bbmustache Hartmut Goebel
2021-10-06 15:20   ` [bug#42180] [PATCH v2 09/23] gnu: Add erlang-getopt Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 10/23] gnu: Add erlang-eunit-formatters Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 11/23] gnu: Add erlang-providers Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 12/23] gnu: Add erlang-parse-trans Hartmut Goebel
2021-10-06 15:20   ` [bug#42180] [PATCH v2 13/23] gnu: Add erlang-hex-core Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 14/23] gnu: Add erlang-ssl-verify-fun Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 15/23] gnu: Add erlang-relx Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 16/23] gnu: Add rebar3 Hartmut Goebel
2021-10-06 15:20   ` [bug#42180] [PATCH v2 17/23] gnu: Add erlang-edown Hartmut Goebel
2021-10-06 15:20   ` [bug#42180] [PATCH v2 18/23] gnu: Add erlang-jsone Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 19/23] gnu: Add erlang-proper Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 20/23] gnu: Add erlang-rebar3-raw-deps Hartmut Goebel
2021-10-06 15:20   ` [bug#42180] [PATCH v2 21/23] gnu: Add erlang-rebar3-git-vsn Hartmut Goebel
2021-10-06 18:43     ` Maxime Devos
2021-10-06 21:09       ` Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 22/23] gnu: Add erlang-rebar3-proper Hartmut Goebel
2021-10-06 15:20   ` [bug#51061] [PATCH v2 23/23] gnu: Add erlang-covertool Hartmut Goebel
2021-10-07 21:55   ` [bug#42180] bug#51061: [PATCH v2 01/23] guix: Add extracting-download Ludovic Courtès
2021-10-07 22:25     ` [bug#51061] " Tobias Geerinckx-Rice via Guix-patches via
2021-10-07 22:34       ` Tobias Geerinckx-Rice via Guix-patches via
2021-10-08  9:10         ` Hartmut Goebel
2021-10-08  9:39           ` Hartmut Goebel
2021-10-08 21:00             ` Tobias Geerinckx-Rice via Guix-patches via
2021-10-08  5:49     ` [bug#51061] " Maxime Devos
2021-10-08  7:05       ` [bug#51061] " Ludovic Courtès
2021-10-07 20:58 ` bug#42180: (no subject) Hartmut Goebel

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=5d19e5b88d46294bb4578110969328353adec0de.1593797694.git.h.goebel@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --cc=42180@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).