From: Ricardo Wurmus <rekado@elephly.net>
To: Pjotr Prins <pjotr.public12@email>
Cc: guix-devel@gnu.org
Subject: [PATCH] Add Elixir (was: )
Date: Mon, 25 Jul 2016 08:13:33 +0200 [thread overview]
Message-ID: <87mvl66ya6.fsf@elephly.net> (raw)
In-Reply-To: <579027b7.VHXjhpPxQC3AAmeY%pjotr.public12@email>
Hi Pjotr
> From 5fd8f64794b27f59f6688177a7a9e532b5d57f01 Mon Sep 17 00:00:00 2001
> Date: Tue, 19 Jul 2016 11:13:27 +0000
> Subject: [PATCH] gnu: Add elixir.
> To: guix-devel@gnu.org
> From: Pjotr Prins <pjotr.public01@thebird.nl>
> References: <578e47d0.i8Ovns6KhzHqzVNC%pjotr.public12@thebird.nl>
>
> * gnu/packages/elixir.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
back to the original patch, which I didn’t look at as the ensuing
discussion on review process and registry proposals took up more time
than I anticipated.
I’m a little uncertain on how to proceed. I have a couple of things
here that I’d like to change before commiting. I’ll add some comments
below. Indentation changes won’t be mentioned ;)
If you are okay with the proposed changes I can apply them on top of
your patch and resubmit the squashed patch to the ML for a final
look-over. Deal?
> + (native-inputs
> + `(("patch" ,patch)
> + ("patch/elixir-disable-failing-tests"
> + ,(search-patch "elixir-disable-failing-tests.patch"))
> + ("patch/elixir-disable-mix-tests"
> + ,(search-patch "elixir-disable-mix-tests.patch"))))
This has been mentioned already and I’d like to move these to the
“source” field after identifying the reason why the build fails
otherwise. I see that you’re doing this in order to patch after the
build phase. Let’s see if this can be avoided.
> + (add-after 'build 'disable-breaking-elixir-tests
> + ;; when patching tests as part of source the build breaks, so we do
> + ;; it after the build phase
> + (lambda* (#:key inputs #:allow-other-keys)
> + (and
> + (zero? (system* "patch" "--force" "-p1" "-i"
> + (assoc-ref inputs "patch/elixir-disable-failing-tests")))
> + (zero? (system* "patch" "--force" "-p1" "-i"
> + (assoc-ref inputs "patch/elixir-disable-mix-tests")))
> + ;; Tests currently fail in these two files:
> + (delete-file "./lib/mix/test/mix/tasks/deps.git_test.exs")
> + (delete-file "./lib/mix/test/mix/shell_test.exs"))))
“delete-file” has an unspecified return value, so chaining it up in
“and” isn’t guaranteed to work. Should this patch-after-build business
turn out to be unavoidable I suggest just deleting the files first, then
and-ing the “zero?” expressions.
> + (replace 'check
> + (lambda _
> + (zero? (system* "make" "test"))))) ;; 3124 tests, 0 failures, 11 skipped
We can use “#:test-target "test"” instead of replacing the “check” phase.
> + #:make-flags (list (string-append "PREFIX=" %output))))
> + (home-page "http://elixir-lang.org/")
> + (synopsis "The Elixir programming language")
s/The//
> + (description "Elixir is a dynamic, functional language used to
> +build scalable and maintainable applications. Elixir leverages the
> +Erlang VM, known for running low-latency, distributed and
> +fault-tolerant systems, while also being successfully used in web
> +development and the embedded software domain.")
> + (license license:asl2.0)))
Looks good!
> diff --git a/gnu/packages/patches/elixir-disable-failing-tests.patch b/gnu/packages/patches/elixir-disable-failing-tests.patch
> new file mode 100644
> index 0000000..802cb1e
> --- /dev/null
> +++ b/gnu/packages/patches/elixir-disable-failing-tests.patch
While I’m generally okay with disabling failing tests (see the
embarassing situation we have with the “icedtea” packages), I think
these can be fixed with little effort. Many of them seem to be related
to the location of the temp directory.
> +diff --git a/lib/elixir/test/elixir/node_test.exs b/lib/elixir/test/elixir/node_test.exs
> +index d1f1fe6..5c2d469 100644
> +--- a/lib/elixir/test/elixir/node_test.exs
> ++++ b/lib/elixir/test/elixir/node_test.exs
> +@@ -6,8 +6,10 @@ defmodule NodeTest do
> + doctest Node
> +
> + test "start/3 and stop/0" do
> +- assert Node.stop == {:error, :not_found}
> +- assert {:ok, _} = Node.start(:hello, :shortnames, 15000)
> +- assert Node.stop() == :ok
> ++ IO.puts "Skipping test because GNU Guix does not allow the HOME environment variable."
> ++
> ++ # assert Node.stop == {:error, :not_found}
> ++ # assert {:ok, _} = Node.start(:hello, :shortnames, 15000)
> ++ # assert Node.stop() == :ok
> + end
> + end
This was already addressed earlier. We can probably just setenv HOME
before the tests.
Some of the remaining tests don’t seem to have any obvious fixes, so
I’ll get to them after making the above changes first. Maybe the
failures disappear then.
Thanks again for the patch. I hope you are willing to provide some
guidance when I have some problems understanding certain bits of the
build.
~~ Ricardo
PS: Elixir is big and getting it accepted in Guix upstream is a
precondition for more Elixir packages. This is why I think it’s worth
picking this up. For other patches this amount of effort may not be
justified (as I cannot get other stuff done at the same time). I do
hope that we can find a way to upstream the 140+ bioinfo packages you
have locally, even it it’s at a trickle rate :)
next prev parent reply other threads:[~2016-07-25 6:13 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-21 1:39 (unknown) Unknown, Pjotr Prins
2016-07-21 1:42 ` [PATCH] gnu: Add elixir Pjotr Prins
2016-07-21 11:43 ` Ben Woodcroft
2016-07-21 12:00 ` Pjotr Prins
2016-07-22 5:26 ` Leo Famulari
2016-07-22 12:55 ` Ludovic Courtès
2016-07-22 14:12 ` Leo Famulari
2016-07-21 12:51 ` none Ludovic Courtès
2016-07-22 0:41 ` none Pjotr Prins
2016-07-22 2:06 ` none Pjotr Prins
2016-07-22 3:25 ` none Jookia
2016-07-22 3:48 ` none Leo Famulari
2016-07-22 4:48 ` none Tobias Geerinckx-Rice
2016-07-22 11:07 ` none Pjotr Prins
2016-07-22 12:23 ` none Ricardo Wurmus
2016-07-22 12:50 ` none Jookia
2016-07-22 21:19 ` none Leo Famulari
2016-07-24 4:17 ` none Jookia
2016-07-24 6:35 ` none Leo Famulari
2016-07-24 7:47 ` none Jookia
2016-07-24 16:52 ` none Christopher Allan Webber
2016-07-24 17:03 ` none Andreas Enge
2016-07-22 8:15 ` none Roel Janssen
2016-07-22 14:07 ` none Leo Famulari
2016-07-22 14:15 ` none Vincent Legoll
2016-07-22 16:13 ` none Ludovic Courtès
2016-07-22 16:38 ` none myglc2
2016-07-23 7:03 ` none Tomáš Čech
2016-07-22 16:02 ` Review process Ludovic Courtès
2016-07-23 2:24 ` Pjotr Prins
2016-07-23 9:05 ` Alex Kost
2016-07-23 9:51 ` Mathieu Lirzin
2016-07-24 8:02 ` Alex Kost
2016-07-24 10:38 ` Mathieu Lirzin
2016-07-24 14:09 ` Ludovic Courtès
2016-07-24 3:30 ` A registry for distributed sources and binaries Pjotr Prins
2016-07-24 5:10 ` Tobias Geerinckx-Rice
2016-07-24 5:16 ` Pjotr Prins
2016-07-24 5:24 ` Pjotr Prins
2016-07-24 5:29 ` Mark H Weaver
2016-07-24 5:48 ` Jookia
2016-07-24 6:37 ` Tobias Geerinckx-Rice
2016-07-24 7:49 ` Jookia
2016-07-24 20:02 ` Ricardo Wurmus
2016-07-24 6:28 ` Tobias Geerinckx-Rice
2016-07-24 7:02 ` Pjotr Prins
2016-07-24 7:29 ` Leo Famulari
2016-07-24 7:41 ` Pjotr Prins
2016-07-24 9:50 ` Mathieu Lirzin
2016-07-24 22:46 ` Ludovic Courtès
2016-07-24 13:58 ` Andreas Enge
2016-07-24 15:21 ` Jookia
2016-07-24 15:58 ` Andreas Enge
2016-07-24 17:18 ` replying to a message of a mailing list you were not subscribed to Danny Milosavljevic
2016-07-24 17:25 ` Danny Milosavljevic
2016-07-25 5:38 ` Ricardo Wurmus
2016-07-25 7:34 ` icecat "mailto" handler does not work - and cannot be reconfigured by user Danny Milosavljevic
2020-10-13 13:23 ` bug#24066: " Maxim Cournoyer
2020-10-16 7:12 ` Brendan Tildesley
2020-10-26 16:39 ` Jonathan Brielmaier
2016-07-24 18:50 ` A registry for distributed sources and binaries John Darrington
2016-07-25 9:14 ` Replying to bug reports Ludovic Courtès
2016-07-25 8:25 ` A registry for distributed sources and binaries Andy Wingo
2016-07-25 22:00 ` Reviewer assignment Ludovic Courtès
2016-07-24 20:35 ` A registry for distributed sources and binaries Ricardo Wurmus
2016-07-25 2:10 ` Pjotr Prins
2016-07-25 3:42 ` Tobias Geerinckx-Rice
2016-07-25 4:57 ` Pjotr Prins
2016-07-25 7:18 ` Tomáš Čech
2016-07-25 9:21 ` Ludovic Courtès
2016-07-26 3:40 ` Pjotr Prins
2016-07-26 3:45 ` Pjotr Prins
2016-07-25 6:13 ` Ricardo Wurmus [this message]
2016-07-25 6:31 ` [PATCH] Add Elixir (was: ) Pjotr Prins
2016-07-28 7:27 ` Ricardo Wurmus
2016-07-28 8:30 ` Vincent Legoll
2016-07-28 10:35 ` Pjotr Prins
2016-07-28 20:35 ` Ricardo Wurmus
2016-07-29 2:38 ` Pjotr Prins
2016-07-29 6:32 ` Vincent Legoll
2016-08-02 8:56 ` Ricardo Wurmus
2016-08-02 14:30 ` Pjotr Prins
2016-08-02 8:44 ` [PATCH] Add Elixir Ricardo Wurmus
2016-08-02 14:29 ` Pjotr Prins
2016-08-02 17:26 ` Ludovic Courtès
2016-08-02 21:25 ` Ricardo Wurmus
2016-08-03 4:41 ` Pjotr Prins
2016-08-09 11:18 ` Pjotr Prins
2016-08-09 11:58 ` Alex Sassmannshausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvl66ya6.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=guix-devel@gnu.org \
--cc=pjotr.public12@email \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.