diff options
author | Pierre-Henry Fröhring <contact@phfrohring.com> | 2023-12-10 14:03:55 +0100 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-12-17 22:22:30 +0100 |
commit | c2ed5a7d134dff0755954dd966cb3a41fc047ba5 (patch) | |
tree | 2b0188a6643797c582adddf0c5c0543785925213 /gnu/packages/elixir.scm | |
parent | e0e6d659b5d798068b9b03860cc2d3e391f6b74f (diff) | |
download | guix-c2ed5a7d134dff0755954dd966cb3a41fc047ba5.tar.gz |
gnu: elixir: Wrap binaries.
* gnu/packages/elixir.scm (elixir)[#:phases]: Add ‘wrap-programs’. [native-search-path]: Add “GUIX_ELIXIR_LIBS”. Change-Id: I75bdde3aeedc1d495ea5fc2c5fc3fcdc5dc3fad2 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages/elixir.scm')
-rw-r--r-- | gnu/packages/elixir.scm | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index 724b42512c..15cbdbdfc7 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm @@ -27,6 +27,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) #:use-module (guix gexp) + #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (gnu packages) @@ -96,9 +97,20 @@ (lambda* (#:key inputs #:allow-other-keys) ;; Some tests require access to a home directory. (setenv "HOME" "/tmp"))) - (delete 'configure)))) - (inputs - (list erlang git)) + (delete 'configure) + (add-after 'install 'wrap-programs + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (programs '("elixir" "elixirc" "iex" "mix"))) + (for-each (lambda (program) + (wrap-program (string-append out "/bin/" program) + '("ERL_LIBS" prefix ("${GUIX_ELIXIR_LIBS}")))) + programs))))))) + (inputs (list erlang git)) + (native-search-paths + (list (search-path-specification + (variable "GUIX_ELIXIR_LIBS") + (files (list (string-append "lib/elixir/" (version-major+minor version))))))) (home-page "https://elixir-lang.org/") (synopsis "Elixir programming language") (description "Elixir is a dynamic, functional language used to build |