nix-community / nix-vscode-extensions

Nix expressions for VSCode and OpenVSX extensions [maintainers: @deemp, @AmeerTaweel]
MIT License
222 stars 13 forks source link

C# devkit language server not working due to dynamically linked dependencies #71

Open dannykruitbosch opened 3 months ago

dannykruitbosch commented 3 months ago

Hi,

Installing the C# devkit extension using the vs-code-marked-place does not work for me. I get this error when the extension tried to start

Unable to find extension target platform - no vsix manifest file exists at /home/danny/.vscode/extensions/ms-dotnettools.csharp/.vsixmanifest
Using dotnet configured on PATH
Dotnet path: /nix/store/m9dbas0s0a0lfgha03hb85cnb3r82bf2-dotnet-sdk-8.0.303/dotnet
Activating C# + C# Dev Kit...
waiting for named pipe information from server...
[stderr] Could not start dynamically linked executable: /nix/store/0h79yhcmvpmb1jkc6sxxr97w6vkiki29-vscode-extension-ms-dotnettools-csharp-2.39.29/share/vscode/extensions/ms-dotnettools.csharp/.roslyn/Microsoft.CodeAnalysis.LanguageServer
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
Language server process exited with 127

As far as I can see, the extension should be patched for this already in the nix-vscode-extensions overrides, so there must be something else I am doing wrong.

Some help on how to fix this would be great.

Danny

deemp commented 2 months ago

@dannykruitbosch, how do you use this flake?

griffi-gh commented 2 months ago

Just use extension from nixpkgs, otherwise even if you work around this, it will fail because it tries to write into the extension directory. Extension form nixpkgs is patched against this