From c676feed86cdf66b0e2a2e85e6bc2299ca4d4ae6 Mon Sep 17 00:00:00 2001 From: Ivan Sokolov Date: Sat, 12 Jul 2025 20:40:46 +0300 Subject: [PATCH] gnu: elixir-hex: Fix install phase. * gnu/packages/elixir.scm (elixir-hex)[arguments]: Get elixir version from inputs instead of elixir package directly. [home-page]: Update project home-page. Change-Id: I1ed27892cc169bea0ac44025a263ac816b58c12e Signed-off-by: Efraim Flashner --- gnu/packages/elixir.scm | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index 96ba0421ea2..0e53223f105 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2021 Oskar Köök ;;; Copyright © 2021 Cees de Groot ;;; Copyright © 2024 Andrew Tropin -;;; Copyright © 2024 Ivan Sokolov +;;; Copyright © 2024, 2025 Ivan Sokolov ;;; Copyright © 2024, 2025 Igor Goryachev ;;; ;;; This file is part of GNU Guix. @@ -200,23 +200,24 @@ being successfully used in web development and the embedded software domain.") (delete 'bootstrap) (delete 'configure) (replace 'build - (lambda* (#:key inputs #:allow-other-keys) + (lambda _ (setenv "MIX_ENV" "prod") (invoke "mix" "compile"))) (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - (define X.Y #$(version-major+minor (package-version elixir))) - (define out (string-append (assoc-ref outputs "out") - "/lib/elixir/" X.Y "/hex")) - (mkdir-p out) - (let* ((prod-dir "_build/prod/lib/hex") + (lambda _ + (let* ((X.Y #$(version-major+minor + (package-version + (lookup-package-input this-package "elixir")))) + (out (string-append #$output "/lib/elixir/" X.Y "/hex")) + (prod-dir "_build/prod/lib/hex") (prod-dir-mix (string-append prod-dir "/.mix"))) (and (directory-exists? prod-dir-mix) (delete-file-recursively prod-dir-mix)) - (copy-recursively "_build/prod/lib/hex" out))))))) + (mkdir-p out) + (copy-recursively prod-dir out))))))) (synopsis "Package manager for the Erlang VM") (description "This project provides tasks that integrate with Mix, Elixir's build tool.") - (home-page "https://hexdocs.pm/makeup_elixir/") + (home-page "https://hexdocs.pm/hex/api-reference.html") (license license:bsd-2)))