2021-01-25 00:26:54 -08:00
|
|
|
{ pkgs, lib }:
|
2017-06-04 11:26:37 -07:00
|
|
|
|
|
|
|
rec {
|
|
|
|
|
2017-06-07 16:39:17 -07:00
|
|
|
/* Similar to callPackageWith/callPackage, but without makeOverridable
|
|
|
|
*/
|
|
|
|
callPackageWith = autoArgs: fn: args:
|
|
|
|
let
|
2018-01-31 11:02:19 -08:00
|
|
|
f = if pkgs.lib.isFunction fn then fn else import fn;
|
2021-01-23 09:15:07 -08:00
|
|
|
auto = builtins.intersectAttrs (lib.functionArgs f) autoArgs;
|
2017-06-07 16:39:17 -07:00
|
|
|
in f (auto // args);
|
|
|
|
|
|
|
|
callPackage = callPackageWith pkgs;
|
|
|
|
|
|
|
|
/* Uses generic-builder to evaluate provided drv containing OTP-version
|
|
|
|
specific data.
|
2017-06-04 11:26:37 -07:00
|
|
|
|
|
|
|
drv: package containing version-specific args;
|
|
|
|
builder: generic builder for all Erlang versions;
|
2017-06-07 16:39:17 -07:00
|
|
|
args: arguments merged into version-specific args, used mostly to customize
|
|
|
|
dependencies;
|
|
|
|
|
|
|
|
Arguments passed to the generic-builder are overridable, used to
|
|
|
|
enable/disable high-level OTP features, like ODBC or WX support;
|
2017-06-04 11:26:37 -07:00
|
|
|
|
2017-06-07 16:39:17 -07:00
|
|
|
Please note that "mkDerivation" defined here is the one called from R16.nix
|
|
|
|
and similar files.
|
2017-06-04 11:26:37 -07:00
|
|
|
*/
|
2017-06-07 16:39:17 -07:00
|
|
|
callErlang = drv: args:
|
|
|
|
let
|
|
|
|
builder = callPackage ../../development/interpreters/erlang/generic-builder.nix args;
|
|
|
|
in
|
|
|
|
callPackage drv {
|
|
|
|
mkDerivation = pkgs.makeOverridable builder;
|
|
|
|
};
|
2017-06-04 11:26:37 -07:00
|
|
|
|
2017-06-23 09:38:10 -07:00
|
|
|
/* Uses generic-builder to evaluate provided drv containing Elixir version
|
|
|
|
specific data.
|
|
|
|
|
|
|
|
drv: package containing version-specific args;
|
|
|
|
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.
|
|
|
|
*/
|
2017-06-26 20:12:39 -07:00
|
|
|
callElixir = drv: args:
|
2017-06-22 17:34:32 -07:00
|
|
|
let
|
2017-06-24 06:44:48 -07:00
|
|
|
builder = callPackage ../interpreters/elixir/generic-builder.nix args;
|
2017-06-22 17:34:32 -07:00
|
|
|
in
|
2017-06-26 20:09:11 -07:00
|
|
|
callPackage drv {
|
|
|
|
mkDerivation = pkgs.makeOverridable builder;
|
|
|
|
};
|
2017-06-22 17:34:32 -07:00
|
|
|
|
2017-07-10 17:25:12 -07:00
|
|
|
/* Uses generic-builder to evaluate provided drv containing Elixir version
|
|
|
|
specific data.
|
|
|
|
|
|
|
|
drv: package containing version-specific args;
|
|
|
|
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.2.nix
|
|
|
|
and similar files.
|
|
|
|
*/
|
|
|
|
callLFE = drv: args:
|
|
|
|
let
|
|
|
|
builder = callPackage ../interpreters/lfe/generic-builder.nix args;
|
|
|
|
in
|
|
|
|
callPackage drv {
|
|
|
|
mkDerivation = pkgs.makeOverridable builder;
|
|
|
|
};
|
|
|
|
|
2017-06-04 11:26:37 -07:00
|
|
|
}
|