-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
108 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,4 +78,4 @@ vim.api.nvim_create_autocmd("BufEnter", { | |
end | ||
end | ||
}) | ||
d, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ lib, elixir, fetchFromGitHub, fetchMixDeps, mixRelease, nix-update-script }: | ||
|
||
let | ||
pname = "elixir-ls"; | ||
version = "0.23.0"; | ||
src = fetchFromGitHub { | ||
owner = "elixir-lsp"; | ||
repo = "elixir-ls"; | ||
rev = "v${version}"; | ||
hash = "sha256-X5BJuqr3TVwpv731ym+Ac3+goA0LH9f3H5wWFwQsAB8="; | ||
fetchSubmodules = true; | ||
}; | ||
in | ||
mixRelease { | ||
inherit pname version src elixir; | ||
|
||
stripDebug = true; | ||
|
||
mixFodDeps = fetchMixDeps { | ||
pname = "mix-deps-${pname}"; | ||
inherit src version elixir; | ||
hash = "sha256-3PVMembw3CpYUQ/ynoPKmu0N5iZwoFu9uNjRS+kS4BY="; | ||
}; | ||
|
||
# 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 | ||
# 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${lib.optionalString (lib.versionAtLeast elixir.version "1.16.0") "2"} | ||
runHook postBuild | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/bin | ||
cp -Rv release $out/lib | ||
# Prepare the wrapper script | ||
substitute release/language_server.sh $out/bin/elixir-ls \ | ||
--replace 'exec "''${dir}/launch.sh"' "exec $out/lib/launch.sh" | ||
chmod +x $out/bin/elixir-ls | ||
substitute release/debug_adapter.sh $out/bin/elixir-debug-adapter \ | ||
--replace 'exec "''${dir}/launch.sh"' "exec $out/lib/launch.sh" | ||
chmod +x $out/bin/elixir-debug-adapter | ||
# prepare the launcher | ||
substituteInPlace $out/lib/launch.sh \ | ||
--replace "ERL_LIBS=\"\$SCRIPTPATH:\$ERL_LIBS\"" \ | ||
"ERL_LIBS=$out/lib:\$ERL_LIBS" \ | ||
--replace "exec elixir" "exec ${elixir}/bin/elixir" | ||
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/elixir-lsp/elixir-ls"; | ||
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 = licenses.asl20; | ||
platforms = platforms.unix; | ||
mainProgram = "elixir-ls"; | ||
maintainers = teams.beam.members; | ||
}; | ||
passthru.updateScript = nix-update-script { }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/nix/store/7c83ka6w0pbz7whj1l95p66w61skb13f-home-manager-files/.config/nvim/init.lua | ||
/nix/store/cadpxvn5x4wp0s32nk90cvigbiarviyv-home-manager-files/.config/nvim/init.lua |