Open
Description
On a Linux machine configured with NixOS, dynamic loading is different. Because of this it's often not possible to simply download a binary that depends on libc and run it.
This manifests as vscode not starting the nextls
binary
[Error - 11:51:56 AM] NextLS client: couldn't create connection to server.
Launching server using command /home/elliott/.cache/elixir-tools/nextls/bin/nextls failed. Error: spawn /home/elliott/.cache/elixir-tools/nextls/bin/nextls ENOENT
Nix provides a utility to change all the loads in place. That seems to get nextls running
steam-run ./nextls
Next LS v0.12.6
The language server for Elixir that just works.
Author: Mitchell Hanberg
Home page: https://www.elixir-tools.dev/next-ls
Source code: https://github.com/elixir-tools/next-ls
nextls [flags]
FLAGS
--stdio Use stdio as the transport mechanism
--port <port> Use TCP as the transport mechanism, with the given port
--help Show help
--version Show nextls version
It might be possible to detect that vscode is on Nixos and then run steam-run nextls
in the extension.
Rust Analyzer also has a similar issue of needing a running process downloaded from the internet. They chose to solve this by having nixos fix up the binary.
Metadata
Metadata
Assignees
Labels
No labels