nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 71 lines 1.9 kB view raw
1{ 2 lib, 3 elixir, 4 fetchFromGitHub, 5 makeWrapper, 6 stdenv, 7 nix-update-script, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "elixir-ls"; 12 version = "0.30.0"; 13 14 src = fetchFromGitHub { 15 owner = "elixir-lsp"; 16 repo = "elixir-ls"; 17 rev = "v${version}"; 18 hash = "sha256-GtkFuof60cOTlHuhcwCnIVtGx6KlHrcazTa/UjAIGAQ="; 19 }; 20 21 patches = [ 22 # patch wrapper script to remove elixir detection and inject necessary paths 23 ./launch.sh.patch 24 ]; 25 26 nativeBuildInputs = [ 27 makeWrapper 28 ]; 29 30 # for substitution 31 env.elixir = elixir; 32 33 dontConfigure = true; 34 dontBuild = true; 35 36 installPhase = '' 37 cp -R . $out 38 ln -s $out/VERSION $out/scripts/VERSION 39 40 substituteAllInPlace $out/scripts/launch.sh 41 42 mkdir -p $out/bin 43 44 makeWrapper $out/scripts/language_server.sh $out/bin/elixir-ls \ 45 --set ELS_LOCAL "1" 46 47 makeWrapper $out/scripts/debug_adapter.sh $out/bin/elixir-debug-adapter \ 48 --set ELS_LOCAL "1" 49 50 runHook postInstall 51 ''; 52 53 meta = { 54 homepage = "https://github.com/elixir-lsp/elixir-ls"; 55 changelog = "https://github.com/elixir-lsp/elixir-ls/releases/tag/v${version}"; 56 description = '' 57 A frontend-independent IDE "smartness" server for Elixir. 58 Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol" 59 ''; 60 longDescription = '' 61 The Elixir Language Server provides a server that runs in the background, providing IDEs, editors, and other tools with information about Elixir Mix projects. 62 It adheres to the Language Server Protocol, a standard for frontend-independent IDE support. 63 Debugger integration is accomplished through the similar VS Code Debug Protocol. 64 ''; 65 license = lib.licenses.asl20; 66 platforms = lib.platforms.unix; 67 mainProgram = "elixir-ls"; 68 teams = [ lib.teams.beam ]; 69 }; 70 passthru.updateScript = nix-update-script { }; 71}