1{ lib, __splicedPackages, erlang }:
2
3let
4 pkgs = __splicedPackages;
5 inherit (lib) makeExtensible;
6
7 lib' = pkgs.callPackage ./lib.nix { };
8
9 # FIXME: add support for overrideScope
10 callPackageWithScope = scope: drv: args: lib.callPackageWith scope drv args;
11 mkScope = scope: pkgs // scope;
12
13 packages = self:
14 let
15 defaultScope = mkScope self;
16 callPackage = drv: args: callPackageWithScope defaultScope drv args;
17 in
18 rec {
19 inherit callPackage erlang;
20 beamPackages = self;
21
22 inherit (callPackage ../tools/build-managers/rebar3 { }) rebar3 rebar3WithPlugins;
23 rebar = callPackage ../tools/build-managers/rebar { };
24
25 pc = callPackage ./pc { };
26 rebar3-proper = callPackage ./rebar3-proper { };
27 rebar3-nix = callPackage ./rebar3-nix { };
28
29 fetchHex = callPackage ./fetch-hex.nix { };
30
31 fetchRebar3Deps = callPackage ./fetch-rebar-deps.nix { };
32 rebar3Relx = callPackage ./rebar3-release.nix { };
33
34 buildRebar3 = callPackage ./build-rebar3.nix { };
35 buildHex = callPackage ./build-hex.nix { };
36 buildErlangMk = callPackage ./build-erlang-mk.nix { };
37 buildMix = callPackage ./build-mix.nix { };
38 fetchMixDeps = callPackage ./fetch-mix-deps.nix { };
39 mixRelease = callPackage ./mix-release.nix { };
40
41 erlang-ls = callPackage ./erlang-ls { };
42 erlfmt = callPackage ./erlfmt { };
43 elvis-erlang = callPackage ./elvis-erlang { };
44
45 # BEAM-based languages.
46 elixir = elixir_1_15;
47
48 elixir_1_15 = lib'.callElixir ../interpreters/elixir/1.15.nix {
49 inherit erlang;
50 debugInfo = true;
51 };
52
53 elixir_1_14 = lib'.callElixir ../interpreters/elixir/1.14.nix {
54 inherit erlang;
55 debugInfo = true;
56 };
57
58 elixir_1_13 = lib'.callElixir ../interpreters/elixir/1.13.nix {
59 inherit erlang;
60 debugInfo = true;
61 };
62
63 elixir_1_12 = lib'.callElixir ../interpreters/elixir/1.12.nix {
64 inherit erlang;
65 debugInfo = true;
66 };
67
68 elixir_1_11 = lib'.callElixir ../interpreters/elixir/1.11.nix {
69 inherit erlang;
70 debugInfo = true;
71 };
72
73 elixir_1_10 = lib'.callElixir ../interpreters/elixir/1.10.nix {
74 inherit erlang;
75 debugInfo = true;
76 };
77
78 # Remove old versions of elixir, when the supports fades out:
79 # https://hexdocs.pm/elixir/compatibility-and-deprecations.html
80
81 elixir-ls = callPackage ./elixir-ls { inherit elixir fetchMixDeps mixRelease; };
82
83 lfe = lfe_2_1;
84 lfe_2_1 = lib'.callLFE ../interpreters/lfe/2.1.nix { inherit erlang buildRebar3 buildHex; };
85
86 # Non hex packages. Examples how to build Rebar/Mix packages with and
87 # without helper functions buildRebar3 and buildMix.
88 hex = callPackage ./hex { };
89 webdriver = callPackage ./webdriver { };
90 };
91in
92makeExtensible packages