Skip to content

Commit

Permalink
elixir-ls: rename elixir_ls to elixir-ls
Browse files Browse the repository at this point in the history
  • Loading branch information
superherointj authored and Yt committed Mar 20, 2023
1 parent 862746a commit 1f24ebb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doc/languages-frameworks/beam.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ You will need to run the build process once to fix the hash to correspond to you

###### FOD {#fixed-output-derivation}

A fixed output derivation will download mix dependencies from the internet. To ensure reproducibility, a hash will be supplied. Note that mix is relatively reproducible. An FOD generating a different hash on each run hasn't been observed (as opposed to npm where the chances are relatively high). See [elixir_ls](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/beam-modules/elixir-ls/default.nix) for a usage example of FOD.
A fixed output derivation will download mix dependencies from the internet. To ensure reproducibility, a hash will be supplied. Note that mix is relatively reproducible. An FOD generating a different hash on each run hasn't been observed (as opposed to npm where the chances are relatively high). See [elixir-ls](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/beam-modules/elixir-ls/default.nix) for a usage example of FOD.

Practical steps

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/beam-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ let
# Remove old versions of elixir, when the supports fades out:
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html

elixir_ls = callPackage ./elixir-ls { inherit elixir fetchMixDeps mixRelease; };
elixir-ls = callPackage ./elixir-ls { inherit elixir fetchMixDeps mixRelease; };

lfe = lfe_1_3;
lfe_1_3 = lib'.callLFE ../interpreters/lfe/1.3.nix { inherit erlang buildRebar3 buildHex; };
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/beam-modules/elixir-ls/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ mixRelease {
sha256 = pinData.depsSha256;
};

# elixir_ls is an umbrella app
# elixir-ls is an umbrella app
# override configurePhase to not skip umbrella children
configurePhase = ''
runHook preConfigure
mix deps.compile --no-deps-check
runHook postConfigure
'';

# elixir_ls require a special step for release
# elixir-ls require a special step for release
# compile and release need to be performed together because
# of the no-deps-check requirement
buildPhase = ''
runHook preBuild
mix do compile --no-deps-check, elixir_ls.release

This comment has been minimized.

Copy link
@MartinElvar

MartinElvar Mar 23, 2023

This breaks for me.

       > warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
       > ==> elixir_ls_utils
       > Generated elixir_ls_utils app
       > ==> elixir_ls_debugger
       > Generated elixir_ls_debugger app
       > ** (Mix) The task "elixir-ls.release" could not be found. Did you mean "elixir_ls.release"?

Also i don't see any change to - vs _ in the original repo https://github.com/elixir-lsp/elixir-ls

MIX_ENV=prod mix elixir_ls.release -o <release_dir>

mix do compile --no-deps-check, elixir-ls.release
runHook postBuild
'';

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/beam-modules/elixir-ls/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if ("$latest_version" === "$current_version") {
.\"sha256\" = \"$tarball_hash\" | \
.\"depsSha256\" = \"\"" $directory/pin.json | sponge $directory/pin.json

const new_mix_hash = $(nix-build -A elixir_ls.mixFodDeps 2>&1 | \
const new_mix_hash = $(nix-build -A elixir-ls.mixFodDeps 2>&1 | \
tail -n 1 | \
sd '\s+got:\s+' '')

Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ mapAliases ({

electrum-dash = throw "electrum-dash has been removed from nixpkgs as the project is abandoned"; # Added 2022-01-01

elixir_ls = elixir-ls; # Added 2023-03-20

# Emacs
emacs28NativeComp = emacs28; # Added 2022-06-08
emacs28Packages = emacs28.pkgs; # Added 2021-10-04
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16583,7 +16583,7 @@ with pkgs;
erlang erlangR25 erlangR24 erlangR23 erlangR22 erlangR21
erlang_odbc erlang_javac erlang_odbc_javac
elixir elixir_1_14 elixir_1_13 elixir_1_12 elixir_1_11 elixir_1_10
elixir_ls;
elixir-ls;

erlang_nox = beam_nox.interpreters.erlang;

Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/beam-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ in
# access for example elixir built with different version of Erlang, use
# `beam.packages.erlangR24.elixir`.
inherit (self.packages.erlang)
elixir elixir_1_14 elixir_1_13 elixir_1_12 elixir_1_11 elixir_1_10 elixir_ls;
elixir elixir_1_14 elixir_1_13 elixir_1_12 elixir_1_11 elixir_1_10 elixir-ls;

inherit (self.packages.erlang) lfe lfe_1_3;
};
Expand Down

0 comments on commit 1f24ebb

Please sign in to comment.