Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, pkgs, erlang }:
2
3let
4 inherit (stdenv.lib) makeExtensible;
5
6 lib = pkgs.callPackage ./lib.nix {};
7
8 # FIXME: add support for overrideScope
9 callPackageWithScope = scope: drv: args: stdenv.lib.callPackageWith scope drv args;
10 mkScope = scope: pkgs // scope;
11
12 packages = self:
13 let
14 defaultScope = mkScope self;
15 callPackage = drv: args: callPackageWithScope defaultScope drv args;
16 in
17 rec {
18 inherit callPackage erlang;
19 beamPackages = self;
20
21 rebar = callPackage ../tools/build-managers/rebar { };
22 rebar3 = callPackage ../tools/build-managers/rebar3 { };
23
24 # rebar3 port compiler plugin is required by buildRebar3
25 pc_1_6_0 = callPackage ./pc {};
26 pc = pc_1_6_0;
27
28 fetchHex = callPackage ./fetch-hex.nix { };
29
30 fetchRebar3Deps = callPackage ./fetch-rebar-deps.nix { };
31 rebar3Relx = callPackage ./rebar3-release.nix { };
32
33 buildRebar3 = callPackage ./build-rebar3.nix {};
34 buildHex = callPackage ./build-hex.nix {};
35 buildErlangMk = callPackage ./build-erlang-mk.nix {};
36 buildMix = callPackage ./build-mix.nix {};
37
38 # BEAM-based languages.
39 elixir = elixir_1_10;
40
41 elixir_1_10 = lib.callElixir ../interpreters/elixir/1.10.nix {
42 inherit rebar erlang;
43 debugInfo = true;
44 };
45
46 elixir_1_9 = lib.callElixir ../interpreters/elixir/1.9.nix {
47 inherit rebar erlang;
48 debugInfo = true;
49 };
50
51 elixir_1_8 = lib.callElixir ../interpreters/elixir/1.8.nix {
52 inherit rebar erlang;
53 debugInfo = true;
54 };
55
56 elixir_1_7 = lib.callElixir ../interpreters/elixir/1.7.nix {
57 inherit rebar erlang;
58 debugInfo = true;
59 };
60
61 elixir_1_6 = lib.callElixir ../interpreters/elixir/1.6.nix {
62 inherit rebar erlang;
63 debugInfo = true;
64 };
65
66 # Remove old versions of elixir, when the supports fades out:
67 # https://hexdocs.pm/elixir/compatibility-and-deprecations.html
68
69 lfe = lfe_1_3;
70 lfe_1_2 = lib.callLFE ../interpreters/lfe/1.2.nix { inherit erlang buildRebar3 buildHex; };
71 lfe_1_3 = lib.callLFE ../interpreters/lfe/1.3.nix { inherit erlang buildRebar3 buildHex; };
72
73 # Non hex packages. Examples how to build Rebar/Mix packages with and
74 # without helper functions buildRebar3 and buildMix.
75 hex = callPackage ./hex {};
76 webdriver = callPackage ./webdriver {};
77 relxExe = callPackage ../tools/erlang/relx-exe {};
78
79 # An example of Erlang/C++ package.
80 cuter = callPackage ../tools/erlang/cuter {};
81 };
82in makeExtensible packages