Files
nixpkgs/pkgs/development/beam-modules/elixir-ls/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

72 lines
1.9 KiB
Nix

{
lib,
elixir,
fetchFromGitHub,
makeWrapper,
stdenv,
nix-update-script,
}:
stdenv.mkDerivation rec {
pname = "elixir-ls";
version = "0.30.0";
src = fetchFromGitHub {
owner = "elixir-lsp";
repo = "elixir-ls";
rev = "v${version}";
hash = "sha256-GtkFuof60cOTlHuhcwCnIVtGx6KlHrcazTa/UjAIGAQ=";
};
patches = [
# patch wrapper script to remove elixir detection and inject necessary paths
./launch.sh.patch
];
nativeBuildInputs = [
makeWrapper
];
# for substitution
env.elixir = elixir;
dontConfigure = true;
dontBuild = true;
installPhase = ''
cp -R . $out
ln -s $out/VERSION $out/scripts/VERSION
substituteAllInPlace $out/scripts/launch.sh
mkdir -p $out/bin
makeWrapper $out/scripts/language_server.sh $out/bin/elixir-ls \
--set ELS_LOCAL "1"
makeWrapper $out/scripts/debug_adapter.sh $out/bin/elixir-debug-adapter \
--set ELS_LOCAL "1"
runHook postInstall
'';
meta = {
homepage = "https://github.com/elixir-lsp/elixir-ls";
changelog = "https://github.com/elixir-lsp/elixir-ls/releases/tag/v${version}";
description = ''
A frontend-independent IDE "smartness" server for Elixir.
Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol"
'';
longDescription = ''
The Elixir Language Server provides a server that runs in the background, providing IDEs, editors, and other tools with information about Elixir Mix projects.
It adheres to the Language Server Protocol, a standard for frontend-independent IDE support.
Debugger integration is accomplished through the similar VS Code Debug Protocol.
'';
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
mainProgram = "elixir-ls";
teams = [ lib.teams.beam ];
};
passthru.updateScript = nix-update-script { };
}