diff mbox series

[bug#71707,02/15] gnu: elixir-hex: Remove redundant directory, fix lint warnings.

Message ID 4351173e2417ee0bd95b37a78c2518ee8edb96fc.1718992389.git.igor@goryachev.org
State New
Headers show
Series Updates and fixes for elixir and dependents | expand

Commit Message

Igor Goryachev June 21, 2024, 7:01 p.m. UTC
* gnu/packages/elixir.scm (elixir-hex): Remove redundant directory, fix lint warnings.

Change-Id: Ic5b29d8ddb9c3d4dc058494cf6cbb5f60a492bb1
---
 gnu/packages/elixir.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm
index ace067aa47..e2e9fcc245 100644
--- a/gnu/packages/elixir.scm
+++ b/gnu/packages/elixir.scm
@@ -174,7 +174,7 @@  (define-public elixir-hex
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/hexpm/hex.git")
+             (url "https://github.com/hexpm/hex")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
@@ -201,9 +201,14 @@  (define-public elixir-hex
           (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"))
+              (define out (string-append (assoc-ref outputs "out")
+                                         "/lib/elixir/" X.Y "/hex"))
               (mkdir-p out)
-              (copy-recursively "_build/prod/lib/hex" out))))))
+              (let* ((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)))))))
     (synopsis "Package manager for the Erlang VM")
     (description
      "This project provides tasks that integrate with Mix, Elixir's build