gnu: qtwebengine: Rename to qtwebengine-5.
[jackhill/guix/guix.git] / gnu / packages / erlang.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Steve Sprang <scs@stevesprang.com>
3 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Pjotr Prins <pjotr.guix@thebird.nl>
5 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2018 Nikita <nikita@n0.is>
7 ;;; Copyright © 2020-2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
8 ;;; Copyright © 2021 Oskar Köök <oskar@maatriks.ee>
9 ;;; Copyright © 2021 Cees de Groot <cg@evrl.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages erlang)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system emacs)
30 #:use-module (guix build-system rebar)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix packages)
34 #:use-module (guix utils)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages fontutils)
37 #:use-module (gnu packages gl)
38 #:use-module (gnu packages ncurses)
39 #:use-module (gnu packages perl)
40 #:use-module (gnu packages version-control)
41 #:use-module (gnu packages tls)
42 #:use-module (gnu packages wxwidgets))
43
44 (define-public erlang
45 (package
46 (name "erlang")
47 (version "25.0.2")
48 (source (origin
49 (method git-fetch)
50 ;; The tarball from http://erlang.org/download contains many
51 ;; pre-compiled files, so we use this snapshot of the source
52 ;; repository.
53 (uri (git-reference
54 (url "https://github.com/erlang/otp")
55 (commit (string-append "OTP-" version))))
56 (file-name (git-file-name name version))
57 (sha256
58 (base32
59 "0xgp035vy0yy5m155rpmf22m6rq7pvw3m65s5mz22bcpj2rw4b0x"))
60 (patches (search-patches "erlang-man-path.patch"))))
61 (build-system gnu-build-system)
62 (native-inputs
63 `(("perl" ,perl)
64
65 ;; Erlang's documentation is distributed in a separate tarball.
66 ("erlang-manpages"
67 ,(origin
68 (method url-fetch)
69 (uri (string-append "http://erlang.org/download/otp_doc_man_"
70 (version-major+minor version) ".tar.gz"))
71 (sha256
72 (base32
73 "17ap4kawlbqmcl13c543gh54p1ng8ivxmbn6lbbij07k81ry5p1y"))))))
74 (inputs
75 (list ncurses openssl wxwidgets))
76 (propagated-inputs
77 (list fontconfig glu mesa))
78 (arguments
79 `(#:test-target "release_tests"
80 #:configure-flags
81 (list "--disable-saved-compile-time"
82 "--enable-dynamic-ssl-lib"
83 "--enable-native-libs"
84 "--enable-shared-zlib"
85 "--enable-smp-support"
86 "--enable-threads"
87 "--enable-wx"
88 (string-append "--with-ssl=" (assoc-ref %build-inputs "openssl")))
89 #:modules ((srfi srfi-19) ; make-time, et cetera.
90 (guix build utils)
91 (guix build gnu-build-system))
92 #:phases
93 (modify-phases %standard-phases
94 (delete 'bootstrap)
95 ;; The are several code fragments that embed timestamps into the
96 ;; output. Here, we alter those fragments to use the value of
97 ;; SOURCE_DATE_EPOCH instead.
98 (add-after 'unpack 'remove-timestamps
99 (lambda _
100 (let ((source-date-epoch
101 (time-utc->date
102 (make-time time-utc 0 (string->number
103 (getenv "SOURCE_DATE_EPOCH"))))))
104 (substitute* "lib/reltool/src/reltool_target.erl"
105 (("Date = date\\(\\),")
106 (string-append "Date = "
107 (date->string source-date-epoch
108 "'{~Y,~m,~d}',"))))
109 (substitute* "lib/reltool/src/reltool_target.erl"
110 (("Time = time\\(\\),")
111 (string-append "Time = "
112 (date->string source-date-epoch
113 "'{~H,~M,~S}',"))))
114 (substitute* '("lib/reltool/src/reltool_target.erl"
115 "lib/sasl/src/systools_make.erl")
116 (("date\\(\\), time\\(\\),")
117 (date->string source-date-epoch
118 "{~Y,~m,~d}, {~H,~M,~S},")))
119 (substitute* "lib/dialyzer/test/small_SUITE_data/src/gs_make.erl"
120 (("tuple_to_list\\(date\\(\\)\\),tuple_to_list\\(time\\(\\)\\)")
121 (date->string
122 source-date-epoch
123 "tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})")))
124 (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
125 (("\\{Y,Mo,D\\} = date\\(\\),")
126 (date->string source-date-epoch
127 "{Y,Mo,D} = {~Y,~m,~d},")))
128 (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
129 (("\\{H,Mi,S\\} = time\\(\\),")
130 (date->string source-date-epoch
131 "{H,Mi,S} = {~H,~M,~S},"))))))
132 (add-after 'unpack 'patch-/bin/sh
133 (lambda* (#:key inputs #:allow-other-keys)
134 (let ((sh (search-input-file inputs "/bin/sh")))
135 (substitute* "erts/etc/unix/run_erl.c"
136 (("sh = \"/bin/sh\";")
137 (string-append "sh = \"" sh "\";")))
138 (substitute* "erts/emulator/sys/unix/sys_drivers.c"
139 (("SHELL \"/bin/sh\"")
140 (string-append "SHELL \"" sh "\"")))
141 (substitute* "erts/emulator/sys/unix/erl_child_setup.c"
142 (("SHELL \"/bin/sh\"")
143 (string-append "SHELL \"" sh "\"")))
144 (substitute* "lib/kernel/src/os.erl"
145 (("/bin/sh") sh)))))
146 (add-after 'patch-source-shebangs 'patch-source-env
147 (lambda _
148 (let ((escripts
149 (append
150 (find-files "." "\\.escript")
151 (find-files "lib/stdlib/test/escript_SUITE_data/")
152 '("erts/lib_src/utils/make_atomics_api"
153 "erts/preloaded/src/add_abstract_code"
154 "lib/diameter/bin/diameterc"
155 "lib/reltool/examples/display_args"
156 "lib/reltool/examples/mnesia_core_dump_viewer"
157 "lib/snmp/src/compile/snmpc.src"
158 "make/verify_runtime_dependencies"
159 "make/emd2exml.in"))))
160 (substitute* escripts
161 (("/usr/bin/env") (which "env"))))))
162 (add-before 'configure 'set-erl-top
163 (lambda _
164 (setenv "ERL_TOP" (getcwd))))
165 (add-after 'install 'patch-erl
166 ;; This only works after install.
167 (lambda* (#:key outputs #:allow-other-keys)
168 (let ((out (assoc-ref outputs "out")))
169 (substitute* (string-append out "/bin/erl")
170 (("sed") (which "sed"))))))
171 (add-after 'install 'install-doc
172 (lambda* (#:key inputs outputs #:allow-other-keys)
173 (let* ((out (assoc-ref outputs "out"))
174 (manpages (assoc-ref inputs "erlang-manpages"))
175 (share (string-append out "/share/")))
176 (mkdir-p share)
177 (with-directory-excursion share
178 (invoke "tar" "xvf" manpages))))))))
179 (home-page "https://www.erlang.org/")
180 (synopsis "The Erlang programming language")
181 (description
182 "Erlang is a programming language used to build massively
183 scalable soft real-time systems with requirements on high
184 availability. Some of its uses are in telecoms, banking, e-commerce,
185 computer telephony and instant messaging. Erlang's runtime system has
186 built-in support for concurrency, distribution and fault tolerance.")
187 ;; Erlang is distributed under the Apache License 2.0, but some components
188 ;; have other licenses. See 'system/COPYRIGHT' in the source distribution.
189 (license (list license:asl2.0 license:bsd-2 license:bsd-3 license:expat
190 license:lgpl2.0+ license:tcl/tk license:zlib))))
191
192 (define-public emacs-erlang
193 (package
194 (name "emacs-erlang")
195 (version (package-version erlang))
196 (source (package-source erlang))
197 (build-system emacs-build-system)
198 (arguments
199 `(#:phases
200 (modify-phases %standard-phases
201 (add-before 'expand-load-path 'change-working-directory
202 (lambda _ (chdir "lib/tools/emacs") #t)))))
203 (home-page "https://www.erlang.org/")
204 (synopsis "Erlang major mode for Emacs")
205 (description
206 "This package provides an Emacs major mode for editing Erlang source
207 files.")
208 (license license:asl2.0)))
209
210 (define-public erlang-bbmustache
211 (package
212 (name "erlang-bbmustache")
213 (version "1.12.2")
214 (source
215 (origin
216 (method url-fetch)
217 (uri (hexpm-uri "bbmustache" version))
218 (sha256
219 (base32 "0fvvaxdpziygxl30j59g98qkh2n47xlb7w5dfpsm2bfcsnj372v8"))))
220 (build-system rebar-build-system)
221 (inputs
222 (list erlang-getopt rebar3-git-vsn
223 erlang-edown)) ; for building the docs
224 (arguments
225 `(#:tests? #f ;; requires mustache specification file
226 #:phases
227 (modify-phases %standard-phases
228 (add-before 'build 'build-more
229 (lambda _
230 (invoke "rebar3" "as" "dev" "escriptize")))
231 (add-after 'install 'install-escript
232 (lambda* (#:key outputs #:allow-other-keys)
233 (let* ((out (assoc-ref outputs "out")))
234 (install-file "_build/dev/bin/bbmustache"
235 (string-append out "/bin"))))))))
236 (home-page "https://github.com/soranoba/bbmustache/")
237 (synopsis "Binary pattern match Based Mustache template engine for Erlang")
238 (description "This Erlang library provides a Binary pattern match Based
239 Mustache template engine")
240 (license license:expat)))
241
242 (define-public erlang-certifi
243 (package
244 (name "erlang-certifi")
245 (version "2.9.0")
246 (source
247 (origin
248 (method url-fetch)
249 (uri (hexpm-uri "certifi" version))
250 (sha256
251 (base32 "0ha6vmf5p3xlbf5w1msa89frhvfk535rnyfybz9wdmh6vdms8v96"))))
252 (build-system rebar-build-system)
253 (arguments
254 `(#:tests? #f)) ;; have not been updated for latest cert bundle
255 (home-page "https://github.com/certifi/erlang-certifi/")
256 (synopsis "Erlang CA certificate bundle")
257 (description "This Erlang library contains a CA bundle that you can
258 reference in your Erlang application. This is useful for systems that do not
259 have CA bundles that Erlang can find itself, or where a uniform set of CAs is
260 valuable.
261
262 This an Erlang specific port of certifi. The CA bundle is derived from
263 Mozilla's canonical set.")
264 (license license:bsd-3)))
265
266 (define-public erlang-cf
267 (package
268 (name "erlang-cf")
269 (version "0.3.1")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (hexpm-uri "cf" version))
274 (sha256
275 (base32 "0wknz4xkqkhgvlx4vx5619p8m65v7g87lfgsvfy04jrsgm28spii"))))
276 (build-system rebar-build-system)
277 (home-page "https://github.com/project-fifo/cf")
278 (synopsis "Terminal colour helper for Erlang io and io_lib")
279 (description "This package provides a helper library for termial colour
280 printing extending the io:format syntax to add colours.")
281 (license license:expat)))
282
283 (define-public erlang-covertool
284 (package
285 (name "erlang-covertool")
286 (version "2.0.4")
287 (source
288 (origin
289 (method url-fetch)
290 (uri (hexpm-uri "covertool" version))
291 (sha256
292 (base32 "1p0c1n3nl4063xwi1sv176l1x68xqf07qwvj444a5z888fx6i5aw"))))
293 (build-system rebar-build-system)
294 (home-page "https://github.com/covertool/covertool")
295 (synopsis "Convert code-coverage data generated by @code{cover} into
296 Cobertura XML reports")
297 (description "This package provides a build tool and plugin to convert
298 exported Erlang @code{cover} data sets into Cobertura XML reports, which can
299 then be feed to the Jenkins Cobertura plug-in.
300
301 On @emph{hex.pm}, this plugin was previously called @code{rebar_covertool}.")
302 (license license:bsd-2)))
303
304 (define-public erlang-cth-readable
305 (package
306 (name "erlang-cth-readable")
307 (version "1.5.1")
308 (source
309 (origin
310 (method url-fetch)
311 (uri (hexpm-uri "cth_readable" version))
312 (sha256
313 (base32 "104xgybb6iciy6i28pyyrarqzliddi8kjyq43ajaav7y5si42rb8"))))
314 (build-system rebar-build-system)
315 (propagated-inputs
316 (list erlang-cf))
317 (arguments
318 `(#:tests? #f)) ;; no test-suite in hex-pm package
319 (home-page "https://github.com/ferd/cth_readable")
320 (synopsis "Common Test hooks for more readable logs for Erlang")
321 (description "This package provides an OTP library to be used for CT log
322 outputs you want to be readable around all that noise they contain.")
323 (license license:bsd-3)))
324
325 (define-public erlang-edown
326 (package
327 (name "erlang-edown")
328 (version "0.8.4")
329 (source
330 (origin
331 (method url-fetch)
332 (uri (hexpm-uri "edown" version))
333 (sha256
334 (base32 "0ij47gvgs6yfqphj0f54qjzj18crj8y1dsjjlzpp3dp8pscqzbqw"))))
335 (build-system rebar-build-system)
336 (home-page "https://github.com/uwiger/edown")
337 (synopsis "Markdown extension for EDoc")
338 (description "This package provides an extension for EDoc for generating
339 Markdown.")
340 (license license:asl2.0)))
341
342 (define-public erlang-erlware-commons
343 (package
344 (name "erlang-erlware-commons")
345 (version "1.6.0")
346 (source
347 (origin
348 (method url-fetch)
349 (uri (hexpm-uri "erlware_commons" version))
350 (sha256
351 (base32 "18qam9xdzi74wppb0cj4zc8161i0i8djr79z8662m6d276f2jz5m"))))
352 (build-system rebar-build-system)
353 (propagated-inputs
354 (list erlang-cf))
355 (native-inputs
356 (list git-minimal/fixed)) ;; Required for tests
357 (arguments
358 `(#:phases
359 (modify-phases %standard-phases
360 (add-before 'check 'check-setup
361 (lambda _
362 (setenv "TERM" "xterm")))))) ; enable color in logs
363 (home-page "http://erlware.github.io/erlware_commons/")
364 (synopsis "Additional standard library for Erlang")
365 (description "Erlware Commons is an Erlware project focused on all aspects
366 of reusable Erlang components.")
367 (license license:expat)))
368
369 (define-public erlang-eunit-formatters
370 (package
371 (name "erlang-eunit-formatters")
372 (version "0.5.0")
373 (source
374 (origin
375 (method url-fetch)
376 (uri (hexpm-uri "eunit_formatters" version))
377 (sha256
378 (base32 "1jb3hzb216r29x2h4pcjwfmx1k81431rgh5v0mp4x5146hhvmj6n"))))
379 (build-system rebar-build-system)
380 (home-page "https://github.com/seancribbs/eunit_formatters")
381 (synopsis "Better output for eunit suites")
382 (description "This package provides a better output for Erlang eunits.")
383 (license license:asl2.0)))
384
385 (define-public erlang-getopt
386 (package
387 (name "erlang-getopt")
388 (version "1.0.2")
389 (source
390 (origin
391 (method url-fetch)
392 (uri (hexpm-uri "getopt" version))
393 (sha256
394 (base32 "09pasi7ki1rivw9sl7xndj5qgjbdqvcscxk83yk85yr28gm9l0m0"))))
395 (build-system rebar-build-system)
396 (home-page "https://github.com/jcomellas/getopt")
397 (synopsis "Command-line options parser for Erlang")
398 (description "This package provides an Erlang module to parse command line
399 arguments using the GNU getopt syntax.")
400 (license license:bsd-3)))
401
402 (define-public erlang-hex-core
403 (package
404 (name "erlang-hex-core")
405 (version "0.8.4")
406 (source
407 (origin
408 (method url-fetch)
409 (uri (hexpm-uri "hex_core" version))
410 (sha256
411 (base32 "06p65hlm29ky03vs3fq3qz6px2ylwp8b0f2y75wdf5cm0kx2332b"))))
412 (build-system rebar-build-system)
413 (arguments
414 `(#:phases
415 (modify-phases %standard-phases
416 (replace 'check
417 (lambda* (#:key tests? #:allow-other-keys)
418 (when tests?
419 (invoke "rebar3" "as" "test" "proper")))))))
420 (inputs
421 (list erlang-proper rebar3-proper))
422 (home-page "https://github.com/hexpm/hex_core")
423 (synopsis "Reference implementation of Hex specifications")
424 (description "This package provides the reference implementation of Hex
425 specifications.")
426 (license license:asl2.0)))
427
428 (define-public erlang-jsone
429 (package
430 (name "erlang-jsone")
431 (version "1.7.0")
432 (source
433 (origin
434 (method url-fetch)
435 (uri (hexpm-uri "jsone" version))
436 (sha256
437 (base32 "1gaxiw76syjp3s9rygskm32y9799b917q752rw8bxj3bxq93g8x3"))))
438 (build-system rebar-build-system)
439 (arguments
440 `(#:phases
441 (modify-phases %standard-phases
442 (add-after 'unpack 'disable-covertool
443 ;; no need to generate a coverage report
444 (lambda _
445 (substitute* "rebar.config"
446 (("\\{project_plugins, \\[covertool\\]\\}\\." _) "")))))))
447 (home-page "https://github.com/sile/jsone/")
448 (synopsis "Erlang JSON Library")
449 (description "An Erlang library for encoding and decoding JSON data.")
450 (license license:expat)))
451
452 (define-public erlang-parse-trans
453 (package
454 (name "erlang-parse-trans")
455 (version "3.4.1")
456 (source
457 (origin
458 (method url-fetch)
459 (uri (hexpm-uri "parse_trans" version))
460 (sha256
461 (base32 "16p4c2xjrvz16kzpr9pmcvi6nxq6rwckqi9fp0ksibaxwxn402k2"))))
462 (build-system rebar-build-system)
463 (inputs
464 (list erlang-getopt))
465 (home-page "https://github.com/uwiger/parse_trans")
466 (synopsis "Parse transform utilities for Erlang")
467 (description "This package captures some useful patterns in parse
468 transformation and code generation for Erlang.
469
470 For example generating standardized accessor functions for records or
471 evaluating an expression at compile-time and substitute the result as a
472 compile-time constant.")
473 (license license:asl2.0)))
474
475 (define-public erlang-proper
476 (package
477 (name "erlang-proper")
478 (version "1.4.0")
479 (source
480 (origin
481 (method url-fetch)
482 (uri (hexpm-uri "proper" version))
483 (sha256
484 (base32 "1fwcas4a9kz3w3z1jqdk9lw8822srfjk9lcpvbxkxlsv3115ha0q"))))
485 (build-system rebar-build-system)
486 (arguments
487 `(#:phases
488 (modify-phases %standard-phases
489 (add-after 'unpack 'disable-covertool
490 ;; no need to generate a coverage report
491 (lambda _
492 (substitute* "rebar.config"
493 (("\\{plugins, \\[covertool\\]\\}\\." _) "")))))))
494 (home-page "https://proper-testing.github.io/")
495 (synopsis "QuickCheck-inspired property-based testing tool for Erlang")
496 (description "PropEr is a tool for the automated, semi-random,
497 property-based testing of Erlang programs. It is fully integrated with
498 Erlang's type language, and can also be used for the model-based random
499 testing of stateful systems.")
500 (license license:gpl3+)))
501
502 (define-public erlang-providers
503 (package
504 (name "erlang-providers")
505 (version "1.9.0")
506 (source
507 (origin
508 (method url-fetch)
509 (uri (hexpm-uri "providers" version))
510 (sha256
511 (base32 "05y0kz3xgx77hzn1l05byaisvmk8bgds7c22hrh0a5ba81sfi1yj"))))
512 (build-system rebar-build-system)
513 (propagated-inputs
514 (list erlang-erlware-commons erlang-getopt))
515 (home-page "https://github.com/tsloughter/providers")
516 (synopsis "Erlang providers library")
517 (description "This package provides an Erlang providers library.")
518 (license license:asl2.0)))
519
520 (define-public erlang-relx
521 (package
522 (name "erlang-relx")
523 (version "4.6.0")
524 (source
525 (origin
526 (method url-fetch)
527 (uri (hexpm-uri "relx" version))
528 (sha256
529 (base32 "02gmfx1vxg9m3mq4njsqhs4972l4nb8m5p1pdcf64g09ccf17y1g"))))
530 (build-system rebar-build-system)
531 (propagated-inputs
532 (list erlang-bbmustache))
533 (home-page "https://erlware.github.io/relx/")
534 (synopsis "Release assembler for Erlang/OTP Releases")
535 (description "Relx assembles releases for an Erlang/OTP release. Given a
536 release specification and a list of directories in which to search for OTP
537 applications it will generate a release output. That output depends heavily on
538 what plugins available and what options are defined, but usually it is simply
539 a well configured release directory.")
540 (license license:asl2.0)))
541
542 (define-public erlang-ssl-verify-fun
543 (package
544 (name "erlang-ssl-verify-fun")
545 (version "1.1.6")
546 (source
547 (origin
548 (method url-fetch)
549 (uri (hexpm-uri "ssl_verify_fun" version))
550 (sha256
551 (base32 "1026l1z1jh25z8bfrhaw0ryk5gprhrpnirq877zqhg253x3x5c5x"))))
552 (build-system rebar-build-system)
553 (home-page "https://github.com/deadtrickster/ssl_verify_fun.erl")
554 (synopsis "SSL verification functions for Erlang")
555 (description "This package provides SSL verification functions for
556 Erlang.")
557 (license license:expat)))
558
559 (define-public rebar3
560 (package
561 (name "rebar3")
562 (version "3.18.0")
563 (source
564 (origin
565 (method git-fetch)
566 (uri (git-reference
567 (url "https://github.com/erlang/rebar3")
568 (commit version)))
569 (file-name (git-file-name name version))
570 (sha256
571 (base32 "09648hzc2mnjwf9klm20cg4hb5rn2xv2gmzcg98ffv37p5yfl327"))))
572 (build-system gnu-build-system)
573 ;; TODO: remove vendored modules, install man-page, install lib(?)
574 (arguments
575 `(#:phases
576 (modify-phases %standard-phases
577 (delete 'bootstrap)
578 (add-after 'unpack 'unpack-dependency-sources
579 (lambda* (#:key inputs #:allow-other-keys)
580 (for-each
581 (lambda (pkgname)
582 (let* ((src (string-append pkgname "-source"))
583 (input (assoc-ref inputs src))
584 (checkouts-dir (string-append "_checkouts/" pkgname))
585 (lib-dir (string-append "_build/default/lib/" pkgname)))
586 (mkdir-p checkouts-dir)
587 (invoke "tar" "-xf" input "-C" checkouts-dir)
588 (invoke "tar" "-xzf"
589 (pk (string-append checkouts-dir "/contents.tar.gz"))
590 "-C" checkouts-dir)
591 (mkdir-p lib-dir)
592 (copy-recursively checkouts-dir lib-dir)))
593 (list "bbmustache" "certifi" "cf" "cth_readable"
594 "eunit_formatters" "getopt" "hex_core" "erlware_commons"
595 "parse_trans" "relx" "ssl_verify_fun" "providers"))))
596 (delete 'configure)
597 (replace 'build
598 (lambda _
599 (setenv "HOME" (getcwd))
600 (invoke "./bootstrap")))
601 (replace 'install
602 (lambda* (#:key outputs #:allow-other-keys)
603 (let* ((out (assoc-ref outputs "out")))
604 (install-file "rebar3" (string-append out "/bin")))))
605 (delete 'check))))
606 (native-inputs
607 (list erlang))
608 (inputs
609 `(("bbmustache-source" ,(package-source erlang-bbmustache))
610 ("certifi-source" ,(package-source erlang-certifi))
611 ("cf-source" ,(package-source erlang-cf))
612 ("cth_readable-source" ,(package-source erlang-cth-readable))
613 ("erlware_commons-source" ,(package-source erlang-erlware-commons))
614 ("eunit_formatters-source" ,(package-source erlang-eunit-formatters))
615 ("getopt-source" ,(package-source erlang-getopt))
616 ("hex_core-source" ,(package-source erlang-hex-core))
617 ("parse_trans-source" ,(package-source erlang-parse-trans))
618 ("relx-source" ,(package-source erlang-relx))
619 ("ssl_verify_fun-source" ,(package-source erlang-ssl-verify-fun))
620 ("providers-source" ,(package-source erlang-providers))))
621 (home-page "https://rebar3.org/")
622 (synopsis "Sophisticated build-tool for Erlang projects that follows OTP
623 principles")
624 (description "@code{rebar3} is an Erlang build tool that makes it easy to
625 compile and test Erlang applications, port drivers and releases.
626
627 @code{rebar3} is a self-contained Erlang script, so it's easy to distribute or
628 even embed directly in a project. Where possible, rebar uses standard
629 Erlang/OTP conventions for project structures, thus minimizing the amount of
630 build configuration work. @code{rebar3} also provides dependency management,
631 enabling application writers to easily re-use common libraries from a variety
632 of locations (git, hg, etc).")
633 (license license:asl2.0)))
634
635 (define-public rebar3-raw-deps
636 (package
637 (name "rebar3-raw-deps")
638 (version "2.0.0")
639 (source
640 (origin
641 (method url-fetch)
642 (uri (hexpm-uri "rebar3_raw_deps" version))
643 (sha256
644 (base32 "1pzmm3m8gb2s9jn8fp6shzgfmy4mvh2vdci0z6nsm74ma3ffh1i3"))))
645 (build-system rebar-build-system)
646 (home-page "https://github.com/soranoba/rebar3_raw_deps")
647 (synopsis "Rebar3 plugin for supporting \"raw\" dependencies")
648 (description "This plugin provides support for handling non-OTP
649 applications as a dependent libraries.")
650 (license license:expat)))
651
652 (define-public rebar3-git-vsn
653 (package
654 (name "rebar3-git-vsn")
655 (version "1.1.1")
656 (source
657 (origin
658 (method url-fetch)
659 (uri (hexpm-uri "rebar3_git_vsn" version))
660 (sha256
661 (base32 "1dfz56034pa25axly9vqdzv3phkn8ll0qwrkws96pbgcprhky1hx"))))
662 (build-system rebar-build-system)
663 (inputs
664 (list git-minimal/fixed))
665 (arguments
666 `(;; Running the tests require binary artifact (tar-file containing
667 ;; samples git repos) TODO: remove these from the source
668 #:tests? #f
669 #:phases
670 (modify-phases %standard-phases
671 (add-after 'unpack 'patch-path
672 (lambda* (#:key inputs #:allow-other-keys)
673 (let ((git (assoc-ref inputs "git-minimal")))
674 (substitute* "src/rebar3_git_vsn.erl"
675 (("rebar_utils:sh\\(\"git " _)
676 (string-append "rebar_utils:sh(\"" git "/bin/git ")))))))))
677 (home-page "https://github.com/soranoba/rebar3_git_vsn")
678 (synopsis "Rebar3 plugin for generating the version from git")
679 (description "This plugin adds support for generating the version from
680 a git checkout.")
681 (license license:expat)))
682
683 (define-public rebar3-proper
684 (package
685 (name "rebar3-proper")
686 (version "0.12.1")
687 (source
688 (origin
689 (method url-fetch)
690 (uri (hexpm-uri "rebar3_proper" version))
691 (sha256
692 (base32 "1f174fb6h2071wr7qbw9aqqvnglzsjlylmyi8215fhrmi38w94b6"))))
693 (build-system rebar-build-system)
694 (home-page "https://github.com/ferd/rebar3_proper")
695 (synopsis "Rebar3 PropEr plugin")
696 (description "This plugin allows running PropEr test suites from within
697 rebar3.")
698 (license license:bsd-3)))