Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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_14;
47
48 elixir_1_14 = lib'.callElixir ../interpreters/elixir/1.14.nix {
49 inherit erlang;
50 debugInfo = true;
51 };
52
53 elixir_1_13 = lib'.callElixir ../interpreters/elixir/1.13.nix {
54 inherit erlang;
55 debugInfo = true;
56 };
57
58 elixir_1_12 = lib'.callElixir ../interpreters/elixir/1.12.nix {
59 inherit erlang;
60 debugInfo = true;
61 };
62
63 elixir_1_11 = lib'.callElixir ../interpreters/elixir/1.11.nix {
64 inherit erlang;
65 debugInfo = true;
66 };
67
68 elixir_1_10 = lib'.callElixir ../interpreters/elixir/1.10.nix {
69 inherit erlang;
70 debugInfo = true;
71 };
72
73 # Remove old versions of elixir, when the supports fades out:
74 # https://hexdocs.pm/elixir/compatibility-and-deprecations.html
75
76 elixir-ls = callPackage ./elixir-ls { inherit elixir fetchMixDeps mixRelease; };
77
78 lfe = lfe_2_1;
79 lfe_2_1 = lib'.callLFE ../interpreters/lfe/2.1.nix { inherit erlang buildRebar3 buildHex; };
80
81 # Non hex packages. Examples how to build Rebar/Mix packages with and
82 # without helper functions buildRebar3 and buildMix.
83 hex = callPackage ./hex { };
84 webdriver = callPackage ./webdriver { };
85 };
86in
87makeExtensible packages