mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
Add in scope rebar version
This commit is contained in:
parent
838956b179
commit
3595f8e8d6
|
@ -39,21 +39,17 @@ let
|
|||
# BEAM-based languages.
|
||||
elixir = defaultScope.elixir-1_4;
|
||||
|
||||
elixir-1_4 = if versionAtLeast (lib.getVersion erlang) "18"
|
||||
then
|
||||
lib.callElixir ../interpreters/elixir/1.4.nix {
|
||||
elixir-1_4 = lib.callElixir ../interpreters/elixir/1.4.nix "18" {
|
||||
debugInfo = true;
|
||||
erlang = erlang;
|
||||
}
|
||||
else throw "Elixir requires at least Erlang/OTP R18.";
|
||||
rebar = defaultScope.rebar;
|
||||
};
|
||||
|
||||
elixir-1_3 = if versionAtLeast (lib.getVersion erlang) "18"
|
||||
then
|
||||
lib.callElixir ../interpreters/elixir/1.3.nix {
|
||||
elixir-1_3 = lib.callElixir ../interpreters/elixir/1.3.nix "18" {
|
||||
debugInfo = true;
|
||||
erlang = erlang;
|
||||
}
|
||||
else throw "Elixir requires at least Erlang/OTP R18.";
|
||||
rebar = defaultScope.rebar;
|
||||
};
|
||||
|
||||
lfe = callPackage ../interpreters/lfe { };
|
||||
|
||||
|
|
|
@ -43,12 +43,31 @@ rec {
|
|||
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
|
||||
inherit (stdenv.lib) versionAtLeast;
|
||||
builder = callPackage ../../development/interpreters/elixir/generic-builder.nix args;
|
||||
in
|
||||
if versionAtLeast (getVersion args.erlang) vsn
|
||||
then
|
||||
callPackage drv {
|
||||
mkDerivation = pkgs.makeOverridable builder;
|
||||
};
|
||||
}
|
||||
else
|
||||
throw "Elixir requires at least Erlang/OTP R${vsn}.";
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue