| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 |
|
| 31 | (define-module (gnu packages erlang)
|
| 32 | #:use-module ((guix licenses) #:prefix license:)
|
| 33 | #:use-module (guix gexp)
|
| 34 | #:use-module (guix build-system gnu)
|
| 35 | #:use-module (guix build-system emacs)
|
| 36 | #:use-module (guix build-system rebar)
|
| 37 | #:use-module (guix download)
|
| 38 | #:use-module (guix git-download)
|
| 39 | #:use-module (guix packages)
|
| 40 | #:use-module (guix utils)
|
| 41 | #:use-module (gnu packages)
|
| 42 | #:use-module (gnu packages fontutils)
|
| 43 | #:use-module (gnu packages gl)
|
| 44 | #:use-module (gnu packages ncurses)
|
| 45 | #:use-module (gnu packages perl)
|
| 46 | #:use-module (gnu packages version-control)
|
| 47 | #:use-module (gnu packages tls)
|
| 48 | #:use-module (gnu packages wxwidgets))
|
| 49 |
|
| 50 | (define-public erlang
|
| 51 | (package
|
| 52 | (name "erlang")
|
| 53 | (version "28.4.3")
|
| 54 | (source (origin
|
| 55 | (method git-fetch)
|
| 56 | |
| 57 | |
| 58 | |
| 59 | (uri (git-reference
|
| 60 | (url "https://github.com/erlang/otp")
|
| 61 | (commit (string-append "OTP-" version))))
|
| 62 | (file-name (git-file-name name version))
|
| 63 | (sha256
|
| 64 | (base32
|
| 65 | "1dsdmp2rccc0rhzy2w8r4amxmc6nr9hbi053j2s0bg9db30b48rc"))
|
| 66 | (patches (search-patches "erlang-man-path.patch"))))
|
| 67 | (build-system gnu-build-system)
|
| 68 | (native-inputs
|
| 69 | `(("perl" ,perl)
|
| 70 | |
| 71 | ("erlang-manpages"
|
| 72 | ,(origin
|
| 73 | (method url-fetch)
|
| 74 | (uri (string-append "https://github.com/erlang/otp/releases/download"
|
| 75 | "/OTP-" version "/otp_doc_man_" version ".tar.gz"))
|
| 76 | (sha256
|
| 77 | (base32
|
| 78 | "1g17wzv8j12g9272yvv55nj4wqs09hxkv3i0vnp7d6gcs24bmphi"))))))
|
| 79 | (inputs
|
| 80 | (list ncurses openssl wxwidgets))
|
| 81 | (propagated-inputs
|
| 82 | (list fontconfig glu mesa))
|
| 83 | (arguments
|
| 84 | `(#:test-target "release_tests"
|
| 85 | #:configure-flags
|
| 86 | (list "--disable-saved-compile-time"
|
| 87 | "--enable-deterministic-build"
|
| 88 | "--enable-dynamic-ssl-lib"
|
| 89 | "--enable-native-libs"
|
| 90 | "--enable-shared-zlib"
|
| 91 | "--enable-smp-support"
|
| 92 | "--enable-threads"
|
| 93 | "--enable-wx"
|
| 94 | (string-append "--with-ssl=" (assoc-ref %build-inputs "openssl")))
|
| 95 | #:modules ((srfi srfi-19) |
| 96 | (guix build utils)
|
| 97 | (guix build gnu-build-system))
|
| 98 | #:phases
|
| 99 | (modify-phases %standard-phases
|
| 100 | (delete 'bootstrap)
|
| 101 | |
| 102 | |
| 103 | |
| 104 | (add-after 'unpack 'remove-timestamps
|
| 105 | (lambda _
|
| 106 | (let ((source-date-epoch
|
| 107 | (time-utc->date
|
| 108 | (make-time time-utc 0 (string->number
|
| 109 | (getenv "SOURCE_DATE_EPOCH"))))))
|
| 110 | (substitute* "lib/dialyzer/test/small_SUITE_data/src/gs_make.erl"
|
| 111 | (("tuple_to_list\\(date\\(\\)\\),tuple_to_list\\(time\\(\\)\\)")
|
| 112 | (date->string
|
| 113 | source-date-epoch
|
| 114 | "tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})"))))))
|
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | (add-after 'unpack 'preserve-source-meta
|
| 120 | (lambda _
|
| 121 | (substitute* "lib/compiler/src/compile.erl"
|
| 122 | (("\\[\\{source,Source\\} \\| Info0\\];")
|
| 123 | "[{source,Source} | Info0];
|
| 124 | [_|_] = Source when IsDeterministic ->
|
| 125 | [{source,Source} | Info0];"))))
|
| 126 | (add-after 'unpack 'patch-/bin/sh
|
| 127 | (lambda* (#:key inputs #:allow-other-keys)
|
| 128 | (let ((sh (search-input-file inputs "/bin/sh")))
|
| 129 | (substitute* "erts/etc/unix/run_erl.c"
|
| 130 | (("sh = \"/bin/sh\";")
|
| 131 | (string-append "sh = \"" sh "\";")))
|
| 132 | (substitute* "erts/emulator/sys/unix/sys_drivers.c"
|
| 133 | (("SHELL \"/bin/sh\"")
|
| 134 | (string-append "SHELL \"" sh "\"")))
|
| 135 | (substitute* "erts/emulator/sys/unix/erl_child_setup.c"
|
| 136 | (("SHELL \"/bin/sh\"")
|
| 137 | (string-append "SHELL \"" sh "\"")))
|
| 138 | (substitute* "lib/kernel/src/os.erl"
|
| 139 | (("/bin/sh") sh)))))
|
| 140 | (add-after 'patch-source-shebangs 'patch-source-env
|
| 141 | (lambda _
|
| 142 | (let ((escripts
|
| 143 | (append
|
| 144 | (find-files "." "\\.escript")
|
| 145 | (find-files "lib/stdlib/test/escript_SUITE_data/")
|
| 146 | '("erts/lib_src/utils/make_atomics_api"
|
| 147 | "erts/preloaded/src/add_abstract_code"
|
| 148 | "lib/diameter/bin/diameterc"
|
| 149 | "lib/reltool/examples/display_args"
|
| 150 | "lib/reltool/examples/mnesia_core_dump_viewer"
|
| 151 | "lib/snmp/src/compile/snmpc.src"
|
| 152 | "make/verify_runtime_dependencies"))))
|
| 153 | (substitute* escripts
|
| 154 | (("/usr/bin/env") (which "env"))))))
|
| 155 | |
| 156 | |
| 157 | |
| 158 | (add-after 'build 'copy-modified-compiler
|
| 159 | (lambda _
|
| 160 | (copy-recursively "lib/compiler/ebin/compile.beam"
|
| 161 | "bootstrap/lib/compiler/ebin/compile.beam")))
|
| 162 | |
| 163 | (add-after 'copy-modified-compiler 'clean-and-make-again
|
| 164 | (lambda _
|
| 165 | (invoke "make" "clean")
|
| 166 | (invoke "make")))
|
| 167 | (add-before 'configure 'set-erl-top
|
| 168 | (lambda _
|
| 169 | (setenv "ERL_TOP" (getcwd))))
|
| 170 | (add-after 'install 'patch-erl
|
| 171 | |
| 172 | (lambda* (#:key outputs #:allow-other-keys)
|
| 173 | (let ((out (assoc-ref outputs "out")))
|
| 174 | (substitute* (string-append out "/bin/erl")
|
| 175 | (("basename") (which "basename"))
|
| 176 | (("dirname") (which "dirname"))))))
|
| 177 | (add-after 'install 'install-doc
|
| 178 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 179 | (let* ((out (assoc-ref outputs "out"))
|
| 180 | (manpages (assoc-ref inputs "erlang-manpages"))
|
| 181 | (share (string-append out "/share/")))
|
| 182 | (mkdir-p share)
|
| 183 | (with-directory-excursion share
|
| 184 | (invoke "tar" "xvf" manpages)))))
|
| 185 | (add-after 'install-doc 'install-chunks
|
| 186 | (lambda _
|
| 187 | (invoke "make" "install-docs" "DOC_TARGETS=chunks"))))))
|
| 188 | (home-page "https://www.erlang.org/")
|
| 189 | (synopsis "The Erlang programming language")
|
| 190 | (description
|
| 191 | "Erlang is a programming language used to build massively
|
| 192 | scalable soft real-time systems with requirements on high
|
| 193 | availability. Some of its uses are in telecoms, banking, e-commerce,
|
| 194 | computer telephony and instant messaging. Erlang's runtime system has
|
| 195 | built-in support for concurrency, distribution and fault tolerance.")
|
| 196 | |
| 197 | |
| 198 | (license (list license:asl2.0 license:bsd-2 license:bsd-3 license:expat
|
| 199 | license:lgpl2.0+ license:tcl/tk license:zlib))))
|
| 200 |
|
| 201 | (define-public erlfmt
|
| 202 | (package
|
| 203 | (name "erlfmt")
|
| 204 | (version "1.8.0")
|
| 205 | (source
|
| 206 | (origin
|
| 207 | (method url-fetch)
|
| 208 | (uri (hexpm-uri "erlfmt" version))
|
| 209 | (sha256
|
| 210 | (base32 "1lspp6s72nl2imyzapy4kbrx1vrnqvigxj3mxjb2zjb7hf5cm0zp"))))
|
| 211 | (build-system rebar-build-system)
|
| 212 | (native-inputs
|
| 213 | (list erlang-getopt))
|
| 214 | (synopsis "Opinionated Erlang code formatter")
|
| 215 | (description "This package provides @code{erlfmt}, an opinionated Erlang
|
| 216 | code formatter.")
|
| 217 | (home-page "https://hexdocs.pm/erlfmt/")
|
| 218 | (license license:asl2.0)))
|
| 219 |
|
| 220 | (define-public emacs-erlang
|
| 221 | (package
|
| 222 | (name "emacs-erlang")
|
| 223 | (version (package-version erlang))
|
| 224 | (source (package-source erlang))
|
| 225 | (build-system emacs-build-system)
|
| 226 | (arguments
|
| 227 | (list #:lisp-directory "lib/tools/emacs"
|
| 228 | #:test-command
|
| 229 | #~(list "emacs" "-Q" "--batch" "-L" "." "-l" "erlang.el"
|
| 230 | "-l" "erlang-test.el" "-f"
|
| 231 | "ert-run-tests-batch-and-exit")))
|
| 232 | (home-page "https://www.erlang.org/")
|
| 233 | (synopsis "Erlang major mode for Emacs")
|
| 234 | (description
|
| 235 | "This package provides an Emacs major mode for editing Erlang source
|
| 236 | files.")
|
| 237 | (license license:asl2.0)))
|
| 238 |
|
| 239 | (define-public erlang-bbmustache
|
| 240 | (package
|
| 241 | (name "erlang-bbmustache")
|
| 242 | (version "1.12.2")
|
| 243 | (source
|
| 244 | (origin
|
| 245 | (method url-fetch)
|
| 246 | (uri (hexpm-uri "bbmustache" version))
|
| 247 | (sha256
|
| 248 | (base32 "0fvvaxdpziygxl30j59g98qkh2n47xlb7w5dfpsm2bfcsnj372v8"))))
|
| 249 | (build-system rebar-build-system)
|
| 250 | (inputs
|
| 251 | (list erlang-getopt rebar3-git-vsn
|
| 252 | erlang-edown)) |
| 253 | (arguments
|
| 254 | `(#:tests? #f |
| 255 | #:phases
|
| 256 | (modify-phases %standard-phases
|
| 257 | (add-before 'build 'build-more
|
| 258 | (lambda _
|
| 259 | (invoke "rebar3" "as" "dev" "escriptize")))
|
| 260 | (add-after 'install 'install-escript
|
| 261 | (lambda* (#:key outputs #:allow-other-keys)
|
| 262 | (let* ((out (assoc-ref outputs "out")))
|
| 263 | (install-file "_build/dev/bin/bbmustache"
|
| 264 | (string-append out "/bin"))))))))
|
| 265 | (home-page "https://github.com/soranoba/bbmustache/")
|
| 266 | (synopsis "Binary pattern match Based Mustache template engine for Erlang")
|
| 267 | (description "This Erlang library provides a Binary pattern match Based
|
| 268 | Mustache template engine")
|
| 269 | (license license:expat)))
|
| 270 |
|
| 271 | (define-public erlang-certifi
|
| 272 | (package
|
| 273 | (name "erlang-certifi")
|
| 274 | (version "2.17.0")
|
| 275 | (source
|
| 276 | (origin
|
| 277 | (method url-fetch)
|
| 278 | (uri (hexpm-uri "certifi" version))
|
| 279 | (sha256
|
| 280 | (base32 "08addvi506cvghn7ivrzqw4dgx67h47mv8mdva03qagh2y57j8l1"))))
|
| 281 | (build-system rebar-build-system)
|
| 282 | (arguments
|
| 283 | `(#:tests? #f)) |
| 284 | (home-page "https://github.com/certifi/erlang-certifi/")
|
| 285 | (synopsis "Erlang CA certificate bundle")
|
| 286 | (description "This Erlang library contains a CA bundle that you can
|
| 287 | reference in your Erlang application. This is useful for systems that do not
|
| 288 | have CA bundles that Erlang can find itself, or where a uniform set of CAs is
|
| 289 | valuable.
|
| 290 |
|
| 291 | This an Erlang specific port of certifi. The CA bundle is derived from
|
| 292 | Mozilla's canonical set.")
|
| 293 | (license license:bsd-3)))
|
| 294 |
|
| 295 | (define-public erlang-cf
|
| 296 | (package
|
| 297 | (name "erlang-cf")
|
| 298 | (version "0.3.1")
|
| 299 | (source
|
| 300 | (origin
|
| 301 | (method url-fetch)
|
| 302 | (uri (hexpm-uri "cf" version))
|
| 303 | (sha256
|
| 304 | (base32 "0wknz4xkqkhgvlx4vx5619p8m65v7g87lfgsvfy04jrsgm28spii"))))
|
| 305 | (build-system rebar-build-system)
|
| 306 | (home-page "https://github.com/project-fifo/cf")
|
| 307 | (synopsis "Terminal colour helper for Erlang io and io_lib")
|
| 308 | (description "This package provides a helper library for terminal colour
|
| 309 | printing extending the io:format syntax to add colours.")
|
| 310 | (license license:expat)))
|
| 311 |
|
| 312 | (define-public erlang-katana-code
|
| 313 | (package
|
| 314 | (name "erlang-katana-code")
|
| 315 | (version "2.4.3")
|
| 316 | (source
|
| 317 | (origin
|
| 318 | (method url-fetch)
|
| 319 | (uri (hexpm-uri "katana_code" version))
|
| 320 | (sha256
|
| 321 | (base32 "1vnchrqx3jk0bsd06xxmzrmw90x3044yn8vxybgcwidavd1n6k31"))))
|
| 322 | (build-system rebar-build-system)
|
| 323 | (synopsis "Functions useful for processing Erlang code.")
|
| 324 | (description
|
| 325 | "This package provides functions useful for processing Erlang code.")
|
| 326 | (home-page "https://hexdocs.pm/katana_code/")
|
| 327 | (license license:asl2.0)))
|
| 328 |
|
| 329 | (define-public erlang-zipper
|
| 330 | (package
|
| 331 | (name "erlang-zipper")
|
| 332 | (version "1.1.1")
|
| 333 | (source
|
| 334 | (origin
|
| 335 | (method url-fetch)
|
| 336 | (uri (hexpm-uri "zipper" version))
|
| 337 | (sha256
|
| 338 | (base32 "02ih1pvfwlvq5j2k8pz3hjn06h16khzfxk6klclr87ix1dfcb8rp"))))
|
| 339 | (build-system rebar-build-system)
|
| 340 | (synopsis "Generic Zipper implementation for Erlang")
|
| 341 | (description "This package provides a generic Zipper implementation
|
| 342 | for Erlang.")
|
| 343 | (home-page "https://hexdocs.pm/zipper/")
|
| 344 | (license license:asl2.0)))
|
| 345 |
|
| 346 | (define-public erlang-yamerl
|
| 347 | (let ((commit "a24f448c0a8084f70b751dc38621047e56fb53cc")
|
| 348 | (revision "0"))
|
| 349 | (package
|
| 350 | (name "erlang-yamerl")
|
| 351 | (version (git-version "0.10.0" revision commit))
|
| 352 | (source
|
| 353 | (origin
|
| 354 | (method git-fetch)
|
| 355 | (uri (git-reference
|
| 356 | |
| 357 | (url "https://github.com/yakaz/yamerl")
|
| 358 | |
| 359 | (commit commit)))
|
| 360 | (file-name (git-file-name name version))
|
| 361 | (sha256
|
| 362 | (base32 "1csq0z4igyybjgmrynz4d49ysv437iyd2xzkhifb5x47lpdpfpkq"))))
|
| 363 | (build-system rebar-build-system)
|
| 364 | (synopsis "YAML and JSON parser in pure Erlang")
|
| 365 | (description
|
| 366 | "Erlang application to parse YAML 1.1 and YAML 1.2 documents, as well as
|
| 367 | JSON documents.")
|
| 368 | (home-page "https://hexdocs.pm/yamerl/")
|
| 369 | (license license:bsd-2))))
|
| 370 |
|
| 371 | (define-public erlang-covertool
|
| 372 | (package
|
| 373 | (name "erlang-covertool")
|
| 374 | (version "2.0.7")
|
| 375 | (source
|
| 376 | (origin
|
| 377 | (method url-fetch)
|
| 378 | (uri (hexpm-uri "covertool" version))
|
| 379 | (sha256
|
| 380 | (base32 "033jnmas28j9c68bgijzm96xffq5irxlqc9fj457rpx0w7b8w5a6"))))
|
| 381 | (build-system rebar-build-system)
|
| 382 | (home-page "https://github.com/covertool/covertool")
|
| 383 | (synopsis "Convert code-coverage data generated by @code{cover} into
|
| 384 | Cobertura XML reports")
|
| 385 | (description "This package provides a build tool and plugin to convert
|
| 386 | exported Erlang @code{cover} data sets into Cobertura XML reports, which can
|
| 387 | then be feed to the Jenkins Cobertura plug-in.
|
| 388 |
|
| 389 | On @emph{hex.pm}, this plugin was previously called @code{rebar_covertool}.")
|
| 390 | (license license:bsd-2)))
|
| 391 |
|
| 392 | (define-public erlang-cth-readable
|
| 393 | (package
|
| 394 | (name "erlang-cth-readable")
|
| 395 | (version "1.6.1")
|
| 396 | (source
|
| 397 | (origin
|
| 398 | (method url-fetch)
|
| 399 | (uri (hexpm-uri "cth_readable" version))
|
| 400 | (sha256
|
| 401 | (base32 "0v4fxdnxyrlmqhkhhiagwvxnhdfgh1m9lbp02pn3drb9qpv827y0"))))
|
| 402 | (build-system rebar-build-system)
|
| 403 | (propagated-inputs
|
| 404 | (list erlang-cf))
|
| 405 | (arguments
|
| 406 | `(#:tests? #f)) |
| 407 | (home-page "https://github.com/ferd/cth_readable")
|
| 408 | (synopsis "Common Test hooks for more readable logs for Erlang")
|
| 409 | (description "This package provides an OTP library to be used for CT log
|
| 410 | outputs you want to be readable around all that noise they contain.")
|
| 411 | (license license:bsd-3)))
|
| 412 |
|
| 413 | (define-public erlang-edown
|
| 414 | (package
|
| 415 | (name "erlang-edown")
|
| 416 | (version "0.9.2")
|
| 417 | (source
|
| 418 | (origin
|
| 419 | (method url-fetch)
|
| 420 | (uri (hexpm-uri "edown" version))
|
| 421 | (sha256
|
| 422 | (base32 "0kgj0y7dh2r4575ihn3ci5q6zbhm7shd23ia3pn6851hm084r5pg"))))
|
| 423 | (build-system rebar-build-system)
|
| 424 | (home-page "https://github.com/uwiger/edown")
|
| 425 | (synopsis "Markdown extension for EDoc")
|
| 426 | (description "This package provides an extension for EDoc for generating
|
| 427 | Markdown.")
|
| 428 | (license license:asl2.0)))
|
| 429 |
|
| 430 | (define-public erlang-erlware-commons
|
| 431 | (package
|
| 432 | (name "erlang-erlware-commons")
|
| 433 | (version "1.9.1")
|
| 434 | (source
|
| 435 | (origin
|
| 436 | (method url-fetch)
|
| 437 | (uri (hexpm-uri "erlware_commons" version))
|
| 438 | (sha256
|
| 439 | (base32 "0i78hh9n7zzajmz5yylzrywyjqkp0mjy3b4phl7fahvpqp916lwr"))))
|
| 440 | (build-system rebar-build-system)
|
| 441 | (propagated-inputs
|
| 442 | (list erlang-cf))
|
| 443 | (native-inputs
|
| 444 | (list git-minimal/pinned)) |
| 445 | (arguments
|
| 446 | `(#:phases
|
| 447 | (modify-phases %standard-phases
|
| 448 | (add-before 'check 'check-setup
|
| 449 | (lambda _
|
| 450 | (setenv "TERM" "xterm")))))) |
| 451 | (home-page "https://erlware.github.io/erlware_commons/")
|
| 452 | (synopsis "Additional standard library for Erlang")
|
| 453 | (description "Erlware Commons is an Erlware project focused on all aspects
|
| 454 | of reusable Erlang components.")
|
| 455 | (license license:expat)))
|
| 456 |
|
| 457 | (define-public erlang-eunit-formatters
|
| 458 | (package
|
| 459 | (name "erlang-eunit-formatters")
|
| 460 | (version "0.6.0")
|
| 461 | (source
|
| 462 | (origin
|
| 463 | (method url-fetch)
|
| 464 | (uri (hexpm-uri "eunit_formatters" version))
|
| 465 | (sha256
|
| 466 | (base32 "1y12crqdii2wn9n3kp6fd454bd4py16i2aqvph5zmmpy11bmyhi8"))))
|
| 467 | (build-system rebar-build-system)
|
| 468 | (home-page "https://github.com/seancribbs/eunit_formatters")
|
| 469 | (synopsis "Better output for eunit suites")
|
| 470 | (description "This package provides a better output for Erlang eunits.")
|
| 471 | (license license:asl2.0)))
|
| 472 |
|
| 473 | (define-public erlang-getopt
|
| 474 | (package
|
| 475 | (name "erlang-getopt")
|
| 476 | (version "1.0.3")
|
| 477 | (source
|
| 478 | (origin
|
| 479 | (method url-fetch)
|
| 480 | (uri (hexpm-uri "getopt" version))
|
| 481 | (sha256
|
| 482 | (base32 "0krj967wnlnfniscdgzbcsckjb8nwfqr49zp9x4j23slmj8dw0by"))))
|
| 483 | (build-system rebar-build-system)
|
| 484 | (home-page "https://github.com/jcomellas/getopt")
|
| 485 | (synopsis "Command-line options parser for Erlang")
|
| 486 | (description "This package provides an Erlang module to parse command line
|
| 487 | arguments using the GNU getopt syntax.")
|
| 488 | (license license:bsd-3)))
|
| 489 |
|
| 490 | (define-public erlang-hex-core
|
| 491 | (package
|
| 492 | (name "erlang-hex-core")
|
| 493 | (version "0.18.0")
|
| 494 | (source
|
| 495 | (origin
|
| 496 | (method url-fetch)
|
| 497 | (uri (hexpm-uri "hex_core" version))
|
| 498 | (sha256
|
| 499 | (base32 "0zp0rmh5p2i60acw6fkm35al9zlnjcax2dirq27vnarwn5il3490"))))
|
| 500 | (build-system rebar-build-system)
|
| 501 | (arguments
|
| 502 | `(#:phases
|
| 503 | (modify-phases %standard-phases
|
| 504 | (replace 'check
|
| 505 | (lambda* (#:key tests? #:allow-other-keys)
|
| 506 | (when tests?
|
| 507 | (invoke "rebar3" "as" "test" "proper")))))))
|
| 508 | (inputs
|
| 509 | (list erlang-proper rebar3-proper))
|
| 510 | (home-page "https://github.com/hexpm/hex_core")
|
| 511 | (synopsis "Reference implementation of Hex specifications")
|
| 512 | (description "This package provides the reference implementation of Hex
|
| 513 | specifications.")
|
| 514 | (license license:asl2.0)))
|
| 515 |
|
| 516 | (define-public erlang-jsone
|
| 517 | (package
|
| 518 | (name "erlang-jsone")
|
| 519 | (version "1.9.0")
|
| 520 | (source
|
| 521 | (origin
|
| 522 | (method url-fetch)
|
| 523 | (uri (hexpm-uri "jsone" version))
|
| 524 | (sha256
|
| 525 | (base32 "0vb4jay3a5x2fpxqlxdl34ky53ym48jxgw5gxaa61hkzbbwxqqv8"))))
|
| 526 | (build-system rebar-build-system)
|
| 527 | (arguments
|
| 528 | `(#:phases
|
| 529 | (modify-phases %standard-phases
|
| 530 | (add-after 'unpack 'disable-covertool
|
| 531 | |
| 532 | (lambda _
|
| 533 | (substitute* "rebar.config"
|
| 534 | (("\\{project_plugins, \\[covertool\\]\\}\\." _) "")))))))
|
| 535 | (home-page "https://github.com/sile/jsone/")
|
| 536 | (synopsis "Erlang JSON Library")
|
| 537 | (description "An Erlang library for encoding and decoding JSON data.")
|
| 538 | (license license:expat)))
|
| 539 |
|
| 540 | (define-public erlang-parse-trans
|
| 541 | (package
|
| 542 | (name "erlang-parse-trans")
|
| 543 | (version "3.4.2")
|
| 544 | (source
|
| 545 | (origin
|
| 546 | (method url-fetch)
|
| 547 | (uri (hexpm-uri "parse_trans" version))
|
| 548 | (sha256
|
| 549 | (base32 "1jnr4k93vgcwnphsvczkwgm0pvnfs51sns9fscr5ghxpwdyk89ac"))))
|
| 550 | (build-system rebar-build-system)
|
| 551 | (inputs
|
| 552 | (list erlang-getopt))
|
| 553 | (home-page "https://github.com/uwiger/parse_trans")
|
| 554 | (synopsis "Parse transform utilities for Erlang")
|
| 555 | (description "This package captures some useful patterns in parse
|
| 556 | transformation and code generation for Erlang.
|
| 557 |
|
| 558 | For example generating standardized accessor functions for records or
|
| 559 | evaluating an expression at compile-time and substitute the result as a
|
| 560 | compile-time constant.")
|
| 561 | (license license:asl2.0)))
|
| 562 |
|
| 563 | (define-public erlang-proper
|
| 564 | (package
|
| 565 | (name "erlang-proper")
|
| 566 | (version "1.5.0")
|
| 567 | (source
|
| 568 | (origin
|
| 569 | (method url-fetch)
|
| 570 | (uri (hexpm-uri "proper" version))
|
| 571 | (sha256
|
| 572 | (base32 "16lnz79r7whz2ysk9zwlrl7hjlpzxbhxixql8lqili754l3czxzv"))))
|
| 573 | (build-system rebar-build-system)
|
| 574 | (arguments
|
| 575 | `(#:phases
|
| 576 | (modify-phases %standard-phases
|
| 577 | (add-after 'unpack 'disable-covertool
|
| 578 | |
| 579 | (lambda _
|
| 580 | (substitute* "rebar.config"
|
| 581 | (("\\{plugins, \\[covertool\\]\\}\\." _) "")))))))
|
| 582 | (home-page "https://proper-testing.github.io/")
|
| 583 | (synopsis "QuickCheck-inspired property-based testing tool for Erlang")
|
| 584 | (description "PropEr is a tool for the automated, semi-random,
|
| 585 | property-based testing of Erlang programs. It is fully integrated with
|
| 586 | Erlang's type language, and can also be used for the model-based random
|
| 587 | testing of stateful systems.")
|
| 588 | (license license:gpl3+)))
|
| 589 |
|
| 590 | (define-public erlang-jsx
|
| 591 | (package
|
| 592 | (name "erlang-jsx")
|
| 593 | (version "3.1.0")
|
| 594 | (source (origin
|
| 595 | (method url-fetch)
|
| 596 | (uri (hexpm-uri "jsx" version))
|
| 597 | (sha256
|
| 598 | (base32
|
| 599 | "1wr7jkxm6nlgvd52xhniav64xr9rml2ngb35rwjwqlqvq7ywhp0c"))))
|
| 600 | (build-system rebar-build-system)
|
| 601 | (arguments
|
| 602 | `(#:phases
|
| 603 | (modify-phases %standard-phases
|
| 604 | |
| 605 | (add-after 'unpack 'fix-tests-for-erlang-27
|
| 606 | (lambda _
|
| 607 | (substitute* "src/jsx_decoder.erl"
|
| 608 | (("\\{\"-0\\.0\", \\[\\{float, 0\\.0\\}, end_json\\], <<\"-0\\.0\">>\\},")
|
| 609 | "{\"0.0\", [{float, 0.0}, end_json], <<\"0.0\">>},
|
| 610 | {\"-0.0\", [{float, -0.0}, end_json], <<\"-0.0\">>},")))))))
|
| 611 | (synopsis "Streaming, evented JSON parsing toolkit")
|
| 612 | (description
|
| 613 | "An Erlang application for consuming, producing and manipulating json.")
|
| 614 | (home-page "https://github.com/talentdeficit/jsx")
|
| 615 | (license license:expat)))
|
| 616 |
|
| 617 | (define-public erlang-providers
|
| 618 | (package
|
| 619 | (name "erlang-providers")
|
| 620 | (version "1.9.0")
|
| 621 | (source
|
| 622 | (origin
|
| 623 | (method url-fetch)
|
| 624 | (uri (hexpm-uri "providers" version))
|
| 625 | (sha256
|
| 626 | (base32 "05y0kz3xgx77hzn1l05byaisvmk8bgds7c22hrh0a5ba81sfi1yj"))))
|
| 627 | (build-system rebar-build-system)
|
| 628 | (propagated-inputs
|
| 629 | (list erlang-erlware-commons erlang-getopt))
|
| 630 | (home-page "https://github.com/tsloughter/providers")
|
| 631 | (synopsis "Erlang providers library")
|
| 632 | (description "This package provides an Erlang providers library.")
|
| 633 | (license license:asl2.0)))
|
| 634 |
|
| 635 | (define-public erlang-provider-asn1
|
| 636 | (package
|
| 637 | (name "erlang-provider-asn1")
|
| 638 | (version "0.4.1")
|
| 639 | (source
|
| 640 | (origin
|
| 641 | (method url-fetch)
|
| 642 | (uri (hexpm-uri "provider_asn1" version))
|
| 643 | (sha256
|
| 644 | (base32 "079rxf4sl88xk67336fd2s48936p8h99cjgjdkpjj9kj48ipm90y"))))
|
| 645 | (build-system rebar-build-system)
|
| 646 | (inputs (list erlang-providers))
|
| 647 | (synopsis "Compile ASN.1 with Rebar3")
|
| 648 | (description "This package contains plugin for ASN.1 compilation from
|
| 649 | within Rebar3.")
|
| 650 | (home-page "https://hex.pm/packages/provider_asn1")
|
| 651 | (license license:expat)))
|
| 652 |
|
| 653 | (define-public erlang-relx
|
| 654 | (package
|
| 655 | (name "erlang-relx")
|
| 656 | (version "4.10.0")
|
| 657 | (source
|
| 658 | (origin
|
| 659 | (method url-fetch)
|
| 660 | (uri (hexpm-uri "relx" version))
|
| 661 | (sha256
|
| 662 | (base32 "16blzc9djzwhaqv4vphl4xgf4siykvg46x9jdsflq3gk65qhymrf"))))
|
| 663 | (build-system rebar-build-system)
|
| 664 | (propagated-inputs
|
| 665 | (list erlang-bbmustache))
|
| 666 | (home-page "https://erlware.github.io/relx/")
|
| 667 | (synopsis "Release assembler for Erlang/OTP Releases")
|
| 668 | (description "Relx assembles releases for an Erlang/OTP release. Given a
|
| 669 | release specification and a list of directories in which to search for OTP
|
| 670 | applications it will generate a release output. That output depends heavily on
|
| 671 | what plugins available and what options are defined, but usually it is simply
|
| 672 | a well configured release directory.")
|
| 673 | (license license:asl2.0)))
|
| 674 |
|
| 675 | (define-public erlang-ssl-verify-fun
|
| 676 | (package
|
| 677 | (name "erlang-ssl-verify-fun")
|
| 678 | (version "1.1.7")
|
| 679 | (source
|
| 680 | (origin
|
| 681 | (method url-fetch)
|
| 682 | (uri (hexpm-uri "ssl_verify_fun" version))
|
| 683 | (sha256
|
| 684 | (base32 "1y37pj5q6gk1vrnwg1vraws9yihrv9g4133w2qq1sh1piw71jk7y"))))
|
| 685 | (build-system rebar-build-system)
|
| 686 | (home-page "https://github.com/deadtrickster/ssl_verify_fun.erl")
|
| 687 | (synopsis "SSL verification functions for Erlang")
|
| 688 | (description "This package provides SSL verification functions for
|
| 689 | Erlang.")
|
| 690 | (license license:expat)))
|
| 691 |
|
| 692 | (define-public rebar3
|
| 693 | (package
|
| 694 | (name "rebar3")
|
| 695 | (version "3.24.0")
|
| 696 | (source
|
| 697 | (origin
|
| 698 | (method git-fetch)
|
| 699 | (uri (git-reference
|
| 700 | (url "https://github.com/erlang/rebar3")
|
| 701 | (commit version)))
|
| 702 | (file-name (git-file-name name version))
|
| 703 | (sha256
|
| 704 | (base32 "1l73csyzxwinhrcsyb8hg2003v35yz6pv98inl3wg1j5587f071s"))))
|
| 705 | (build-system gnu-build-system)
|
| 706 | |
| 707 | (arguments
|
| 708 | `(#:phases
|
| 709 | (modify-phases %standard-phases
|
| 710 | (delete 'bootstrap)
|
| 711 | (add-after 'unpack 'unpack-dependency-sources
|
| 712 | (lambda* (#:key inputs #:allow-other-keys)
|
| 713 | (for-each
|
| 714 | (lambda (pkgname)
|
| 715 | (let* ((src (string-append pkgname "-source"))
|
| 716 | (input (assoc-ref inputs src))
|
| 717 | (checkouts-dir (string-append "_checkouts/" pkgname))
|
| 718 | (lib-dir (string-append "_build/default/lib/" pkgname)))
|
| 719 | (mkdir-p checkouts-dir)
|
| 720 | (invoke "tar" "-xf" input "-C" checkouts-dir)
|
| 721 | (invoke "tar" "-xzf"
|
| 722 | (pk (string-append checkouts-dir "/contents.tar.gz"))
|
| 723 | "-C" checkouts-dir)
|
| 724 | (mkdir-p lib-dir)
|
| 725 | (copy-recursively checkouts-dir lib-dir)))
|
| 726 | (list "bbmustache" "certifi" "cf" "cth_readable"
|
| 727 | "eunit_formatters" "getopt" "hex_core" "erlware_commons"
|
| 728 | "parse_trans" "relx" "ssl_verify_fun" "providers"))))
|
| 729 | (delete 'configure)
|
| 730 | |
| 731 | |
| 732 | |
| 733 | (add-before 'build 'make-escriptize-reproducible
|
| 734 | (lambda _
|
| 735 | (substitute* "apps/rebar/src/rebar_prv_escriptize.erl"
|
| 736 | (("mtime = DateTime")
|
| 737 | "atime = DateTime,ctime = DateTime,mtime = DateTime"))))
|
| 738 | (replace 'build
|
| 739 | (lambda _
|
| 740 | (setenv "HOME" (getcwd))
|
| 741 | (invoke "./bootstrap")))
|
| 742 | (replace 'install
|
| 743 | (lambda* (#:key outputs #:allow-other-keys)
|
| 744 | (let* ((out (assoc-ref outputs "out")))
|
| 745 | (install-file "rebar3" (string-append out "/bin")))))
|
| 746 | (delete 'check))))
|
| 747 | (native-inputs
|
| 748 | (list erlang))
|
| 749 | (inputs
|
| 750 | `(("bbmustache-source" ,(package-source erlang-bbmustache))
|
| 751 | ("certifi-source" ,(package-source erlang-certifi))
|
| 752 | ("cf-source" ,(package-source erlang-cf))
|
| 753 | ("cth_readable-source" ,(package-source erlang-cth-readable))
|
| 754 | ("erlware_commons-source" ,(package-source erlang-erlware-commons))
|
| 755 | ("eunit_formatters-source" ,(package-source erlang-eunit-formatters))
|
| 756 | ("getopt-source" ,(package-source erlang-getopt))
|
| 757 | ("hex_core-source" ,(package-source erlang-hex-core))
|
| 758 | ("parse_trans-source" ,(package-source erlang-parse-trans))
|
| 759 | ("relx-source" ,(package-source erlang-relx))
|
| 760 | ("ssl_verify_fun-source" ,(package-source erlang-ssl-verify-fun))
|
| 761 | ("providers-source" ,(package-source erlang-providers))))
|
| 762 | (home-page "https://rebar3.org/")
|
| 763 | (synopsis "Sophisticated build-tool for Erlang projects that follows OTP
|
| 764 | principles")
|
| 765 | (description "@code{rebar3} is an Erlang build tool that makes it easy to
|
| 766 | compile and test Erlang applications, port drivers and releases.
|
| 767 |
|
| 768 | @code{rebar3} is a self-contained Erlang script, so it's easy to distribute or
|
| 769 | even embed directly in a project. Where possible, rebar uses standard
|
| 770 | Erlang/OTP conventions for project structures, thus minimizing the amount of
|
| 771 | build configuration work. @code{rebar3} also provides dependency management,
|
| 772 | enabling application writers to easily re-use common libraries from a variety
|
| 773 | of locations (git, hg, etc).")
|
| 774 | (license license:asl2.0)))
|
| 775 |
|
| 776 | (define-public rebar3-raw-deps
|
| 777 | (package
|
| 778 | (name "rebar3-raw-deps")
|
| 779 | (version "2.0.0")
|
| 780 | (source
|
| 781 | (origin
|
| 782 | (method url-fetch)
|
| 783 | (uri (hexpm-uri "rebar3_raw_deps" version))
|
| 784 | (sha256
|
| 785 | (base32 "1pzmm3m8gb2s9jn8fp6shzgfmy4mvh2vdci0z6nsm74ma3ffh1i3"))))
|
| 786 | (build-system rebar-build-system)
|
| 787 | (home-page "https://github.com/soranoba/rebar3_raw_deps")
|
| 788 | (synopsis "Rebar3 plugin for supporting \"raw\" dependencies")
|
| 789 | (description "This plugin provides support for handling non-OTP
|
| 790 | applications as a dependent libraries.")
|
| 791 | (license license:expat)))
|
| 792 |
|
| 793 | (define-public rebar3-ex-doc
|
| 794 | (package
|
| 795 | (name "rebar3-ex-doc")
|
| 796 | (version "0.3.0")
|
| 797 | (source
|
| 798 | (origin
|
| 799 | (method url-fetch)
|
| 800 | (uri (hexpm-uri "rebar3_ex_doc" version))
|
| 801 | (sha256
|
| 802 | (base32 "0ypq30xwgz4pndlin23548ba73j6dvi6ii10qjgn25ski2z00q82"))))
|
| 803 | (build-system rebar-build-system)
|
| 804 | (synopsis "Rebar3 plugin for generating docs with ex_doc")
|
| 805 | (description "This plugin provides support for generating docs with
|
| 806 | @code{ex_doc}.")
|
| 807 | (home-page "https://hexdocs.pm/rebar3_ex_doc/")
|
| 808 | (license license:asl2.0)))
|
| 809 |
|
| 810 | (define-public rebar3-git-vsn
|
| 811 | (package
|
| 812 | (name "rebar3-git-vsn")
|
| 813 | (version "1.1.1")
|
| 814 | (source
|
| 815 | (origin
|
| 816 | (method url-fetch)
|
| 817 | (uri (hexpm-uri "rebar3_git_vsn" version))
|
| 818 | (sha256
|
| 819 | (base32 "1dfz56034pa25axly9vqdzv3phkn8ll0qwrkws96pbgcprhky1hx"))))
|
| 820 | (build-system rebar-build-system)
|
| 821 | (inputs
|
| 822 | (list git-minimal/pinned))
|
| 823 | (arguments
|
| 824 | `( |
| 825 | |
| 826 | #:tests? #f
|
| 827 | #:phases
|
| 828 | (modify-phases %standard-phases
|
| 829 | (add-after 'unpack 'patch-path
|
| 830 | (lambda* (#:key inputs #:allow-other-keys)
|
| 831 | (let ((git (assoc-ref inputs "git-minimal")))
|
| 832 | (substitute* "src/rebar3_git_vsn.erl"
|
| 833 | (("rebar_utils:sh\\(\"git " _)
|
| 834 | (string-append "rebar_utils:sh(\"" git "/bin/git ")))))))))
|
| 835 | (home-page "https://github.com/soranoba/rebar3_git_vsn")
|
| 836 | (synopsis "Rebar3 plugin for generating the version from git")
|
| 837 | (description "This plugin adds support for generating the version from
|
| 838 | a git checkout.")
|
| 839 | (license license:expat)))
|
| 840 |
|
| 841 | (define-public rebar3-hank
|
| 842 | (package
|
| 843 | (name "rebar3-hank")
|
| 844 | (version "1.6.1")
|
| 845 | (source
|
| 846 | (origin
|
| 847 | (method url-fetch)
|
| 848 | (uri (hexpm-uri "rebar3_hank" version))
|
| 849 | (sha256
|
| 850 | (base32 "052v29ir14h4s81k8cwysda0jzl19ggsmw7aydwnqryb982sl5gc"))))
|
| 851 | (build-system rebar-build-system)
|
| 852 | (inputs (list erlang-katana-code))
|
| 853 | (synopsis "Rebar3 plugin for dead code cleaning")
|
| 854 | (description
|
| 855 | "This package provides a rebar3 plugin for dead code cleaning.")
|
| 856 | (home-page "https://hexdocs.pm/rebar3_hank/")
|
| 857 | (license license:expat)))
|
| 858 |
|
| 859 | (define-public rebar3-proper
|
| 860 | (package
|
| 861 | (name "rebar3-proper")
|
| 862 | (version "0.12.1")
|
| 863 | (source
|
| 864 | (origin
|
| 865 | (method url-fetch)
|
| 866 | (uri (hexpm-uri "rebar3_proper" version))
|
| 867 | (sha256
|
| 868 | (base32 "1f174fb6h2071wr7qbw9aqqvnglzsjlylmyi8215fhrmi38w94b6"))))
|
| 869 | (build-system rebar-build-system)
|
| 870 | (home-page "https://github.com/ferd/rebar3_proper")
|
| 871 | (synopsis "Rebar3 PropEr plugin")
|
| 872 | (description "This plugin allows running PropEr test suites from within
|
| 873 | rebar3.")
|
| 874 | (license license:bsd-3)))
|
| 875 |
|
| 876 | (define-public erlang-pc
|
| 877 | (package
|
| 878 | (name "erlang-pc")
|
| 879 | (version "1.15.0")
|
| 880 | (source
|
| 881 | (origin
|
| 882 | (method url-fetch)
|
| 883 | (uri (hexpm-uri "pc" version))
|
| 884 | (sha256
|
| 885 | (base32 "1cwm8pjsmjllfj41g62blkzvhiw3wy7j3nhpsm9y7jipci7ss3sc"))))
|
| 886 | (build-system rebar-build-system)
|
| 887 | (synopsis "Rebar3 port compiler for native code")
|
| 888 | (description "This package provides support for compiling native code
|
| 889 | for Rebar3.")
|
| 890 | (home-page "https://hex.pm/packages/pc")
|
| 891 | (license license:expat)))
|
| 892 |
|
| 893 | (define-public erlang-lfe
|
| 894 | (package
|
| 895 | (name "erlang-lfe")
|
| 896 | (version "2.1.4")
|
| 897 | (source (origin
|
| 898 | (method git-fetch)
|
| 899 | (uri (git-reference
|
| 900 | (url "https://github.com/lfe/lfe")
|
| 901 | (commit (string-append "v" version))))
|
| 902 | (file-name (git-file-name name version))
|
| 903 | (sha256
|
| 904 | (base32
|
| 905 | "0yyh8jmdi7c4y6vjrk3zw4iy7iyqcs5h88hx96ml9dx2im2aydlq"))))
|
| 906 | (build-system gnu-build-system)
|
| 907 | (arguments
|
| 908 | (list
|
| 909 | #:modules '((ice-9 ftw)
|
| 910 | (srfi srfi-26)
|
| 911 | (guix build gnu-build-system)
|
| 912 | (guix build utils))
|
| 913 | #:make-flags #~(list (string-append "PREFIX=" #$output) "CC=gcc")
|
| 914 | #:phases
|
| 915 | #~(modify-phases %standard-phases
|
| 916 | (delete 'configure)
|
| 917 | |
| 918 | |
| 919 | (add-after 'unpack 'make-deterministic
|
| 920 | (lambda _
|
| 921 | (substitute* "src/lfe_env.erl"
|
| 922 | (("maps:fold\\(F, A, D\\)")
|
| 923 | "lists:sort(maps:fold(F, A, D))"))))
|
| 924 | |
| 925 | (add-before 'check 'erlang-depends
|
| 926 | (lambda* (#:key inputs #:allow-other-keys)
|
| 927 | (define input-directories
|
| 928 | (list #$(this-package-native-input "rebar3-proper")
|
| 929 | #$(this-package-native-input "erlang-proper")))
|
| 930 | (mkdir-p "_checkouts")
|
| 931 | (for-each
|
| 932 | (lambda (input-dir)
|
| 933 | (let ((elibdir (string-append input-dir "/lib/erlang/lib")))
|
| 934 | (when (directory-exists? elibdir)
|
| 935 | (for-each
|
| 936 | (lambda (dirname)
|
| 937 | (let ((src (string-append elibdir "/" dirname))
|
| 938 | (dest (string-append "_checkouts/" dirname)))
|
| 939 | (when (not (file-exists? dest))
|
| 940 | |
| 941 | |
| 942 | |
| 943 | |
| 944 | |
| 945 | (copy-recursively src dest #:follow-symlinks? #t)
|
| 946 | (for-each (cut chmod <> #o777)
|
| 947 | (find-files dest)))))
|
| 948 | (scandir elibdir (lambda (file)
|
| 949 | (and (not (member file '("." "..")))
|
| 950 | (file-is-directory?
|
| 951 | (string-append elibdir
|
| 952 | "/"
|
| 953 | file)))))))))
|
| 954 | input-directories)))
|
| 955 | (replace 'check
|
| 956 | (lambda* (#:key tests? #:allow-other-keys)
|
| 957 | (when tests?
|
| 958 | (begin
|
| 959 | (setenv "REBAR_CACHE_DIR" "/tmp")
|
| 960 | (substitute* "Makefile"
|
| 961 | |
| 962 | |
| 963 | |
| 964 | (("-n 20,ct") "-n 20, ct"))
|
| 965 | (invoke "make" "-j" (number->string (parallel-job-count))
|
| 966 | "tests"))))))))
|
| 967 | (native-inputs (list rebar3 rebar3-proper erlang-proper))
|
| 968 | (propagated-inputs (list erlang))
|
| 969 | (home-page "https://github.com/lfe/lfe")
|
| 970 | (synopsis "Lisp Flavoured Erlang")
|
| 971 | (description
|
| 972 | "LFE, Lisp Flavoured Erlang, is a Lisp syntax front-end to the Erlang
|
| 973 | compiler. Code produced with it is compatible with \"normal\" Erlang
|
| 974 | code. An LFE evaluator and shell is also included.")
|
| 975 | (license license:asl2.0)))
|