diff options
| author | Pierre-Henry Fröhring <phfrohring@deeplinks.com> | 2023-12-10 14:03:56 +0100 |
|---|---|---|
| committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-12-17 22:22:30 +0100 |
| commit | 612f8afac10a91b78ad5d134598488d43339c702 (patch) | |
| tree | 27b70b80ce33e9a13d3a3d063ab1802cda7c03e6 /gnu/packages/elixir.scm | |
| parent | c2ed5a7d134dff0755954dd966cb3a41fc047ba5 (diff) | |
gnu: Add elixir-hex.
* gnu/packages/elixir.scm (elixir-hex): New variable.
Change-Id: I957688ae4e078afd79acd439880c38083fdab83a
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages/elixir.scm')
| -rw-r--r-- | gnu/packages/elixir.scm | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index 15cbdbdfc7f..ef8c39d0d70 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm | |||
| @@ -118,3 +118,48 @@ scalable and maintainable applications. Elixir leverages the Erlang VM, known | |||
| 118 | for running low-latency, distributed and fault-tolerant systems, while also | 118 | for running low-latency, distributed and fault-tolerant systems, while also |
| 119 | being successfully used in web development and the embedded software domain.") | 119 | being successfully used in web development and the embedded software domain.") |
| 120 | (license license:asl2.0))) | 120 | (license license:asl2.0))) |
| 121 | |||
| 122 | (define-public elixir-hex | ||
| 123 | (package | ||
| 124 | (name "elixir-hex") | ||
| 125 | (version "2.0.5") | ||
| 126 | (source | ||
| 127 | (origin | ||
| 128 | (method git-fetch) | ||
| 129 | (uri (git-reference | ||
| 130 | (url "https://github.com/hexpm/hex.git") | ||
| 131 | (commit (string-append "v" version)))) | ||
| 132 | (file-name (git-file-name name version)) | ||
| 133 | (sha256 | ||
| 134 | (base32 | ||
| 135 | "1kvczwvij58kgkhak68004ap81pl26600bczg21mymy2sypkgxmj")))) | ||
| 136 | ;; The mix-build-system assumes that Hex exists. | ||
| 137 | ;; We build Hex using the gnu-build-system. | ||
| 138 | ;; Other Elixir packages use the mix-build-system. | ||
| 139 | (build-system gnu-build-system) | ||
| 140 | (inputs (list elixir)) | ||
| 141 | (arguments | ||
| 142 | (list | ||
| 143 | ;; Hex is needed to build packages used to test Hex. | ||
| 144 | ;; To avoid this circularity, we disable tests. | ||
| 145 | #:tests? #f | ||
| 146 | #:phases | ||
| 147 | #~(modify-phases %standard-phases | ||
| 148 | (delete 'bootstrap) | ||
| 149 | (delete 'configure) | ||
| 150 | (replace 'build | ||
| 151 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 152 | (setenv "MIX_ENV" "prod") | ||
| 153 | (invoke "mix" "compile"))) | ||
| 154 | (replace 'install | ||
| 155 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 156 | (define X.Y #$(version-major+minor (package-version elixir))) | ||
| 157 | (define out (string-append (assoc-ref outputs "out") "/lib/elixir/" X.Y "/hex")) | ||
| 158 | (mkdir-p out) | ||
| 159 | (copy-recursively "_build/prod/lib/hex" out)))))) | ||
| 160 | (synopsis "Package manager for the Erlang VM") | ||
| 161 | (description | ||
| 162 | "This project provides tasks that integrate with Mix, Elixir's build | ||
| 163 | tool.") | ||
| 164 | (home-page "https://hexdocs.pm/makeup_elixir/") | ||
| 165 | (license license:bsd-2))) | ||
