Message ID | LsbC_aj--3-1@maatriks.ee |
---|---|
State | Accepted |
Headers | show |
Series | [bug#37912] gnu: elixir: Update to 1.9.2. | expand |
Hi Oskar, Oskar Köök <oskar@maatriks.ee> skribis: >>From f2eb88f567f93e578e3c2df76046fed4f45645f8 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Oskar=20K=C3=B6=C3=B6k?= <oskarkook@maatriks.ee> > Date: Thu, 24 Oct 2019 23:37:38 +0300 > Subject: [PATCH] gnu: elixir: Update to 1.9.2. > > * gnu/packages/elixir.scm (elixir): Update to 1.9.2. Thanks for the updated patch! I believe this addresses the comments that Marius made, and it builds fine for me, so I went ahead and applied it. Thank you! Ludo’.
Hi Thanks. I went ahead and did some further reading on the constraints of Elixir Releases and in the end it seems the current behaviour is actually just fine. The documentation itself notes that there is already effectively a dependency on package managers: > In addition to matching the target triple, it is also important that thetarget has all of the system packages that your application will need atruntime. A common one is the need for OpenSSL when building an applicationthat uses :crypto or :ssl, which is dynamically linked to ERTS. The othercommon source for native dependencies like this comes from dependenciescontaining NIFs (natively-implemented functions) which may expect todynamically link to libraries they use. > These system packages are typically managed using the system package manager,but if necessary, you can also bundle the compiled object files in the release,as long as they were compiled for the same target. This means that if you're creating an Elixir Release with Elixir built in Guix, you should also have the needed Guix packages installed on your target. Optionally the user can create a script that modifies the release to be compatible with the target (e.g. replace /gnu/store/* references with /bin/*). Oskar Nov 16, 2019, 18:34 by ludo@gnu.org: > Hi Oskar, > > Oskar Köök <oskar@maatriks.ee> skribis: > > >>From f2eb88f567f93e578e3c2df76046fed4f45645f8 Mon Sep 17 00:00:00 2001 > >> From: =?UTF-8?q?Oskar=20K=C3=B6=C3=B6k?= <oskarkook@maatriks.ee> >> Date: Thu, 24 Oct 2019 23:37:38 +0300 >> Subject: [PATCH] gnu: elixir: Update to 1.9.2. >> >> * gnu/packages/elixir.scm (elixir): Update to 1.9.2. >> > > Thanks for the updated patch! I believe this addresses the comments > that Marius made, and it builds fine for me, so I went ahead and applied > it. > > Thank you! > > Ludo’. >
Ludovic Courtès <ludo@gnu.org> writes: > Hi Oskar, > > Oskar Köök <oskar@maatriks.ee> skribis: > >>>From f2eb88f567f93e578e3c2df76046fed4f45645f8 Mon Sep 17 00:00:00 2001 >> From: =?UTF-8?q?Oskar=20K=C3=B6=C3=B6k?= <oskarkook@maatriks.ee> >> Date: Thu, 24 Oct 2019 23:37:38 +0300 >> Subject: [PATCH] gnu: elixir: Update to 1.9.2. >> >> * gnu/packages/elixir.scm (elixir): Update to 1.9.2. > > Thanks for the updated patch! I believe this addresses the comments > that Marius made, and it builds fine for me, so I went ahead and applied > it. > > Thank you! Whoops, this patch fell through the cracks, thanks for taking care of it.
From f2eb88f567f93e578e3c2df76046fed4f45645f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20K=C3=B6=C3=B6k?= <oskarkook@maatriks.ee> Date: Thu, 24 Oct 2019 23:37:38 +0300 Subject: [PATCH] gnu: elixir: Update to 1.9.2. * gnu/packages/elixir.scm (elixir): Update to 1.9.2. --- gnu/packages/elixir.scm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index 88ada71aea..144a8cc4e7 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm @@ -33,7 +33,7 @@ (define-public elixir (package (name "elixir") - (version "1.8.2") + (version "1.9.2") (source (origin (method git-fetch) @@ -42,7 +42,7 @@ (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1n77cpcl2b773gmj3m9s24akvj9gph9byqbmj2pvlsmby4aqwckq")) + (base32 "19yn6nx6r627f5zbyc7ckgr96d6b45sgwx95n2gp2imqwqvpj8wc")) (patches (search-patches "elixir-path-length.patch")))) (build-system gnu-build-system) (arguments @@ -63,9 +63,21 @@ "lib/mix/lib/mix/scm/git.ex") (("(cmd\\(['\"])git" _ prefix) (string-append prefix (which "git")))) + (substitute* '("lib/mix/lib/mix/release.ex" + "lib/mix/lib/mix/tasks/release.init.ex") + (("#!/bin/sh") + (string-append "#!" (which "sh")))) (substitute* "bin/elixir" - (("ERL_EXEC=\"erl\"") - (string-append "ERL_EXEC=" (which "erl")))) + (("ERTS_BIN=") + (string-append + "ERTS_BIN=" + ;; Elixir Releases will prepend to ERTS_BIN the path of a copy of erl. + ;; We detect if a release is being generated by checking the initial ERTS_BIN + ;; value: if it's empty, we are not in release mode and can point to the actual + ;; erl binary in Guix store. + "\nif [ -z \"$ERTS_BIN\" ]; then ERTS_BIN=" + (string-drop-right (which "erl") 3) + "; fi"))) (substitute* "bin/mix" (("#!/usr/bin/env elixir") (string-append "#!" out "/bin/elixir")))) -- 2.21.0