Add in scope rebar version
This commit is contained in:
parent
838956b179
commit
3595f8e8d6
@ -39,21 +39,17 @@ let
|
|||||||
# BEAM-based languages.
|
# BEAM-based languages.
|
||||||
elixir = defaultScope.elixir-1_4;
|
elixir = defaultScope.elixir-1_4;
|
||||||
|
|
||||||
elixir-1_4 = if versionAtLeast (lib.getVersion erlang) "18"
|
elixir-1_4 = lib.callElixir ../interpreters/elixir/1.4.nix "18" {
|
||||||
then
|
debugInfo = true;
|
||||||
lib.callElixir ../interpreters/elixir/1.4.nix {
|
erlang = erlang;
|
||||||
debugInfo = true;
|
rebar = defaultScope.rebar;
|
||||||
erlang = erlang;
|
};
|
||||||
}
|
|
||||||
else throw "Elixir requires at least Erlang/OTP R18.";
|
|
||||||
|
|
||||||
elixir-1_3 = if versionAtLeast (lib.getVersion erlang) "18"
|
elixir-1_3 = lib.callElixir ../interpreters/elixir/1.3.nix "18" {
|
||||||
then
|
debugInfo = true;
|
||||||
lib.callElixir ../interpreters/elixir/1.3.nix {
|
erlang = erlang;
|
||||||
debugInfo = true;
|
rebar = defaultScope.rebar;
|
||||||
erlang = erlang;
|
};
|
||||||
}
|
|
||||||
else throw "Elixir requires at least Erlang/OTP R18.";
|
|
||||||
|
|
||||||
lfe = callPackage ../interpreters/lfe { };
|
lfe = callPackage ../interpreters/lfe { };
|
||||||
|
|
||||||
|
@ -43,12 +43,31 @@ rec {
|
|||||||
mkDerivation = pkgs.makeOverridable builder;
|
mkDerivation = pkgs.makeOverridable builder;
|
||||||
};
|
};
|
||||||
|
|
||||||
callElixir = drv: args:
|
/* Uses generic-builder to evaluate provided drv containing Elixir version
|
||||||
|
specific data.
|
||||||
|
|
||||||
|
drv: package containing version-specific args;
|
||||||
|
vsn: minimum OTP version that Elixir will build on;
|
||||||
|
builder: generic builder for all Erlang versions;
|
||||||
|
args: arguments merged into version-specific args, used mostly to customize
|
||||||
|
dependencies;
|
||||||
|
|
||||||
|
Arguments passed to the generic-builder are overridable.
|
||||||
|
|
||||||
|
Please note that "mkDerivation" defined here is the one called from 1.4.nix
|
||||||
|
and similar files.
|
||||||
|
*/
|
||||||
|
callElixir = drv: vsn: args:
|
||||||
let
|
let
|
||||||
|
inherit (stdenv.lib) versionAtLeast;
|
||||||
builder = callPackage ../../development/interpreters/elixir/generic-builder.nix args;
|
builder = callPackage ../../development/interpreters/elixir/generic-builder.nix args;
|
||||||
in
|
in
|
||||||
callPackage drv {
|
if versionAtLeast (getVersion args.erlang) vsn
|
||||||
mkDerivation = pkgs.makeOverridable builder;
|
then
|
||||||
};
|
callPackage drv {
|
||||||
|
mkDerivation = pkgs.makeOverridable builder;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw "Elixir requires at least Erlang/OTP R${vsn}.";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user