;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2016 Pjotr Prins <pjotr.public12@thebird.nl>
+;;; Copyright © 2016, 2017 Pjotr Prins <pjotr.guix@thebird.nl>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 nee <nee.git@cock.li>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Nils Gillmann <ng0@n0.is>
;;;
;;; This file is part of GNU Guix.
;;;
(define-public elixir
(package
(name "elixir")
- (version "1.3.2")
+ (version "1.6.6")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/elixir-lang/elixir"
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "0jsc6kl7f74yszcypdv3w3vhyc9qfqav8nwc41in082m0vpfy95y"))
- ;; FIXME: Some tests had to be disabled as they fail in the
- ;; build environment. Common failures are:
- ;; - Mix.Shell.cmd() fails with error 130
- ;; - The git_repo fixture cannot be found
- ;; - Communication with spawned processes fails with EPIPE
- ;; - Failure to copy files
- (patches (search-patches "elixir-disable-failing-tests.patch"))))
+ "0c9qz5hasa59a9x1iwpcqpqj6wdbzpijfxqfmzimwj5z8q37nl3l"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
+ #:parallel-tests? #f ;see <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32171#23>
#:make-flags (list (string-append "PREFIX="
(assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'replace-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("lib/elixir/lib/system.ex"
- "lib/mix/lib/mix/scm/git.ex")
- (("(cmd\\(['\"])git" _ prefix)
- (string-append prefix (which "git"))))
- (substitute* "bin/elixir"
- (("ERL_EXEC=\"erl\"")
- (string-append "ERL_EXEC=" (which "erl"))))
- #t))
- (add-after 'unpack 'fix-or-disable-tests
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Some tests require access to a home directory.
- (setenv "HOME" "/tmp")
-
- ;; FIXME: These tests fail because the "git_repo" fixture does
- ;; not exist or cannot be found.
- (delete-file "lib/mix/test/mix/tasks/deps.git_test.exs")
-
- ;; FIXME: Mix.Shell.cmd() always fails with error code 130.
- (delete-file "lib/mix/test/mix/shell_test.exs")
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* '("lib/elixir/lib/system.ex"
+ "lib/mix/lib/mix/scm/git.ex")
+ (("(cmd\\(['\"])git" _ prefix)
+ (string-append prefix (which "git"))))
+ (substitute* "bin/elixir"
+ (("ERL_EXEC=\"erl\"")
+ (string-append "ERL_EXEC=" (which "erl"))))
+ (substitute* "bin/mix"
+ (("#!/usr/bin/env elixir")
+ (string-append "#!" out "/bin/elixir"))))
#t))
(add-before 'build 'make-current
;; The Elixir compiler checks whether or not to compile files by
(utime file recent recent 0 0)))
(find-files "." ".*"))
#t))
+ (add-before 'check 'set-home
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Some tests require access to a home directory.
+ (setenv "HOME" "/tmp")
+ #t))
(delete 'configure))))
(inputs
`(("erlang" ,erlang)