diff options
author | Sergei Maximov <s.b.maximov@gmail.com> | 2021-11-02 15:57:13 +0300 |
---|---|---|
committer | Raphael Megzari <raphael@megzari.com> | 2021-11-03 08:46:46 +0900 |
commit | 2a9336b426753b1f948bed19c97f07b0f081be46 (patch) | |
tree | 3492627a952697e51ae640133046f13fdade5ff6 /pkgs/development/beam-modules/fetch-mix-deps.nix | |
parent | 45891c5f1c9d03397e8a77a35214a4ce83dc597d (diff) | |
download | nixlib-2a9336b426753b1f948bed19c97f07b0f081be46.tar nixlib-2a9336b426753b1f948bed19c97f07b0f081be46.tar.gz nixlib-2a9336b426753b1f948bed19c97f07b0f081be46.tar.bz2 nixlib-2a9336b426753b1f948bed19c97f07b0f081be46.tar.lz nixlib-2a9336b426753b1f948bed19c97f07b0f081be46.tar.xz nixlib-2a9336b426753b1f948bed19c97f07b0f081be46.tar.zst nixlib-2a9336b426753b1f948bed19c97f07b0f081be46.zip |
elixir-ls: build LS using the same Elixir version that is used to run LS
The Elixir LS package in Nixpkgs by default used the latest Elixir version available to compile and run Elixir LS. The user can build a custom Elixir LS package with a different Elixir version: my-custom-elixir-ls = pkgs.elixir-ls.override { elixir = my-custom-elixir; }; But by doing so the user changes only the Elixir version used to run Elixir LS; the Elixir version used to compile Elixir LS doesn't change. As the result, the custom Elixir LS package uses a different Elixir version at runtime than the Elixir version it was compiled with. In order to be able to modify the Elixir version used at build time, I changed `mixRelease` and `fetchMixDeps` to accept `elixir` and `hex` as parameters (defaults to the latest Elixir and Hex packages).
Diffstat (limited to 'pkgs/development/beam-modules/fetch-mix-deps.nix')
-rw-r--r-- | pkgs/development/beam-modules/fetch-mix-deps.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/development/beam-modules/fetch-mix-deps.nix b/pkgs/development/beam-modules/fetch-mix-deps.nix index 0c6f4e35a90e..ac6d5f3c8b92 100644 --- a/pkgs/development/beam-modules/fetch-mix-deps.nix +++ b/pkgs/development/beam-modules/fetch-mix-deps.nix @@ -1,4 +1,4 @@ -{ stdenvNoCC, lib, elixir, hex, rebar, rebar3, cacert, git }: +{ stdenvNoCC, lib, elixir, hex, rebar, rebar3, cacert, git }@inputs: { pname , version @@ -8,6 +8,8 @@ , debug ? false , meta ? { } , patches ? [] +, elixir ? inputs.elixir +, hex ? inputs.hex.override { inherit elixir; } , ... }@attrs: |