gnu: elixir: Don't use unstable tarball.

* gnu/packages/elixir.scm (elixir)[source]: Use GIT-FETCH & GIT-FILE-NAME.
[arguments]: Add ‘make-git-checkout-writable’ phase.
This commit is contained in:
Tobias Geerinckx-Rice 2019-09-17 15:04:40 +02:00
parent 9e8b549fe6
commit cadf846bea
No known key found for this signature in database
GPG Key ID: D889B0F018C5493C
1 changed files with 16 additions and 11 deletions

View File

@ -24,7 +24,7 @@
(define-module (gnu packages elixir) (define-module (gnu packages elixir)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix download) #:use-module (guix git-download)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages erlang) #:use-module (gnu packages erlang)
@ -34,15 +34,16 @@
(package (package
(name "elixir") (name "elixir")
(version "1.8.2") (version "1.8.2")
(source (origin (source
(method url-fetch) (origin
(uri (string-append "https://github.com/elixir-lang/elixir" (method git-fetch)
"/archive/v" version ".tar.gz")) (uri (git-reference
(file-name (string-append name "-" version ".tar.gz")) (url "https://github.com/elixir-lang/elixir.git")
(sha256 (commit (string-append "v" version))))
(base32 (file-name (git-file-name name version))
"0ddqxw24zdqlg7glzk22m7qjal8f18divzp364a6gi1bv6rg16yg")) (sha256
(patches (search-patches "elixir-path-length.patch")))) (base32 "1n77cpcl2b773gmj3m9s24akvj9gph9byqbmj2pvlsmby4aqwckq"))
(patches (search-patches "elixir-path-length.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:test-target "test" `(#:test-target "test"
@ -51,7 +52,11 @@
(assoc-ref %outputs "out"))) (assoc-ref %outputs "out")))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'replace-paths (add-after 'unpack 'make-git-checkout-writable
(lambda _
(for-each make-file-writable (find-files "."))
#t))
(add-after 'make-git-checkout-writable 'replace-paths
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(substitute* '("lib/elixir/lib/system.ex" (substitute* '("lib/elixir/lib/system.ex"