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