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 erlang-ls = callPackage ./erlang-ls { }; 49 erlfmt = callPackage ./erlfmt { }; 50 elvis-erlang = callPackage ./elvis-erlang { }; 51 52 # BEAM-based languages. 53 elixir = elixir_1_18; 54 55 elixir_1_19 = lib'.callElixir ../interpreters/elixir/1.19.nix { 56 inherit erlang; 57 debugInfo = true; 58 }; 59 60 elixir_1_18 = lib'.callElixir ../interpreters/elixir/1.18.nix { 61 inherit erlang; 62 debugInfo = true; 63 }; 64 65 elixir_1_17 = lib'.callElixir ../interpreters/elixir/1.17.nix { 66 inherit erlang; 67 debugInfo = true; 68 }; 69 70 elixir_1_16 = lib'.callElixir ../interpreters/elixir/1.16.nix { 71 inherit erlang; 72 debugInfo = true; 73 }; 74 75 elixir_1_15 = lib'.callElixir ../interpreters/elixir/1.15.nix { 76 inherit erlang; 77 debugInfo = true; 78 }; 79 80 elixir_1_14 = lib'.callElixir ../interpreters/elixir/1.14.nix { 81 inherit erlang; 82 debugInfo = true; 83 }; 84 85 # Remove old versions of elixir, when the supports fades out: 86 # https://hexdocs.pm/elixir/compatibility-and-deprecations.html 87 88 ex_doc = callPackage ./ex_doc { 89 inherit fetchMixDeps mixRelease; 90 }; 91 92 elixir-ls = callPackage ./elixir-ls { inherit elixir; }; 93 94 lfe = lfe_2_1; 95 lfe_2_1 = lib'.callLFE ../interpreters/lfe/2.1.nix { inherit erlang buildRebar3 buildHex; }; 96 97 livebook = callPackage ./livebook { }; 98 99 # Non hex packages. Examples how to build Rebar/Mix packages with and 100 # without helper functions buildRebar3 and buildMix. 101 hex = callPackage ./hex { }; 102 webdriver = callPackage ./webdriver { }; 103 }; 104in 105makeExtensible packages