Generalize building of Elixir interpreter

This commit is contained in:
Justin Wood
2017-06-22 20:34:32 -04:00
parent 3270545094
commit 019afb0c80
7 changed files with 48 additions and 18 deletions

View File

@@ -0,0 +1,6 @@
{ mkDerivation }:
mkDerivation rec {
version = "1.3.4";
sha256 = "01qqv1ghvfadcwcr5p88w8j217cgaf094pmpqllij3l0q1yg104l";
}

View File

@@ -0,0 +1,6 @@
{ mkDerivation }:
mkDerivation rec {
version = "1.4.5";
sha256 = "18ivcxmh5bak13k3rjy7jjzin57rgb2nffhwnqb2wl7bpi8mrarw";
}

View File

@@ -1,21 +1,20 @@
{ stdenv, fetchFromGitHub, erlang, rebar, makeWrapper, coreutils, curl, bash,
debugInfo ? false }:
{ pkgs, stdenv, fetchFromGitHub, erlang, rebar, makeWrapper, coreutils, curl
, bash, debugInfo ? false }:
stdenv.mkDerivation rec {
name = "elixir-${version}";
version = "1.4.4";
{ baseName ? "elixir"
, version
, sha256 ? null
, rev ? "v${version}"
, src ? fetchFromGitHub { inherit rev sha256; owner = "elixir-lang"; repo = "elixir"; }
}:
src = fetchFromGitHub {
owner = "elixir-lang";
repo = "elixir";
rev = "v${version}";
sha256 = "0m51cirkv1dahw4z2jlmz58cwmpy0dya88myx4wykq0v5bh1xbq8";
};
stdenv.mkDerivation ({
name = "${baseName}-${version}";
inherit src version;
buildInputs = [ erlang rebar makeWrapper ];
# Elixir expects that UTF-8 locale to be set (see https://github.com/elixir-lang/elixir/issues/3548).
# In other cases there is warnings during compilation.
LANG = "en_US.UTF-8";
LC_TYPE = "en_US.UTF-8";
@@ -66,6 +65,6 @@ stdenv.mkDerivation rec {
license = licenses.epl10;
platforms = platforms.unix;
maintainers = with maintainers; [ the-kenny havvy couchemar ];
maintainers = with maintainers; [ the-kenny havvy couchemar ankhers ];
};
}
})