Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, pkgs, erlang }: 2 3let 4 inherit (lib) makeExtensible; 5 6 lib' = pkgs.callPackage ./lib.nix { }; 7 8 # FIXME: add support for overrideScope 9 callPackageWithScope = scope: drv: args: 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 inherit (callPackage ../tools/build-managers/rebar3 { }) rebar3 rebar3WithPlugins; 22 rebar = callPackage ../tools/build-managers/rebar { }; 23 24 pc = callPackage ./pc { }; 25 rebar3-proper = callPackage ./rebar3-proper { }; 26 rebar3-nix = callPackage ./rebar3-nix { }; 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 fetchMixDeps = callPackage ./fetch-mix-deps.nix { }; 38 mixRelease = callPackage ./mix-release.nix { }; 39 40 erlang-ls = callPackage ./erlang-ls { }; 41 erlfmt = callPackage ./erlfmt { }; 42 elvis-erlang = callPackage ./elvis-erlang { }; 43 44 # BEAM-based languages. 45 elixir = elixir_1_13; 46 47 elixir_1_13 = lib'.callElixir ../interpreters/elixir/1.13.nix { 48 inherit erlang; 49 debugInfo = true; 50 }; 51 52 elixir_1_12 = lib'.callElixir ../interpreters/elixir/1.12.nix { 53 inherit erlang; 54 debugInfo = true; 55 }; 56 57 elixir_1_11 = lib'.callElixir ../interpreters/elixir/1.11.nix { 58 inherit erlang; 59 debugInfo = true; 60 }; 61 62 elixir_1_10 = lib'.callElixir ../interpreters/elixir/1.10.nix { 63 inherit erlang; 64 debugInfo = true; 65 }; 66 67 elixir_1_9 = lib'.callElixir ../interpreters/elixir/1.9.nix { 68 inherit erlang; 69 debugInfo = true; 70 }; 71 72 # Remove old versions of elixir, when the supports fades out: 73 # https://hexdocs.pm/elixir/compatibility-and-deprecations.html 74 75 elixir_ls = callPackage ./elixir-ls { inherit elixir fetchMixDeps mixRelease; }; 76 77 lfe = lfe_1_3; 78 lfe_1_3 = lib'.callLFE ../interpreters/lfe/1.3.nix { inherit erlang buildRebar3 buildHex; }; 79 80 # Non hex packages. Examples how to build Rebar/Mix packages with and 81 # without helper functions buildRebar3 and buildMix. 82 hex = callPackage ./hex { }; 83 webdriver = callPackage ./webdriver { }; 84 }; 85in 86makeExtensible packages