-
-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package request: vscode extension ms-dotnettools.csdevkit #270423
Comments
Seems, it will be hard due to this. UPD: after installation it tries to create
|
Seems, it works: Code(pkgs.vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-dotnet-runtime";
publisher = "ms-dotnettools";
version = "2.0.0";
sha256 = "sha256-oTeVskg9yfohlBW4GhgQj3TsweUoZ6WuxmntsispxOo=";
};
postPatch = ''
chmod +x "$PWD/dist/install scripts/dotnet-install.sh"
'';
})
(pkgs.vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "csdevkit";
publisher = "ms-dotnettools";
version = "1.3.4";
sha256 = "sha256-36lL754/kRwlnMXRiiTvHM80oWPR3MW5GBUCdHpefFc=";
arch = "linux-x64";
};
sourceRoot = "./extension";
postPatch = with pkgs; ''
patchelf_add_icu_as_needed() {
declare elf="''${1?}"
declare icu_major_v="${ lib.head (lib.splitVersion (lib.getVersion icu.name)) }"
for icu_lib in icui18n icuuc icudata; do
patchelf --add-needed "lib''${icu_lib}.so.$icu_major_v" "$elf"
done
}
patchelf_common() {
declare elf="''${1?}"
chmod +x "$elf"
patchelf_add_icu_as_needed "$elf"
patchelf --add-needed "libssl.so" "$elf"
patchelf --add-needed "libz.so.1" "$elf"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc openssl zlib icu.out ]}:\$ORIGIN" \
"$elf"
}
sed -i -E -e 's/(e.extensionPath,"cache")/require("os").homedir(),".cache","Microsoft", "csdevkit","cache"/g' "$PWD/dist/extension.js"
sed -i -E -e 's/o\.chmod/console.log/g' "$PWD/dist/extension.js"
patchelf_common ./components/vs-green-server/platforms/linux-x64/node_modules/@microsoft/visualstudio-server.linux-x64/Microsoft.VisualStudio.Code.Server
patchelf_common ./components/vs-green-server/platforms/linux-x64/node_modules/@microsoft/servicehub-controller-net60.linux-x64/Microsoft.ServiceHub.Controller
patchelf_common ./components/vs-green-server/platforms/linux-x64/node_modules/@microsoft/visualstudio-code-servicehost.linux-x64/Microsoft.VisualStudio.Code.ServiceHost
patchelf_common ./components/vs-green-server/platforms/linux-x64/node_modules/@microsoft/visualstudio-reliability-monitor.linux-x64/Microsoft.VisualStudio.Reliability.Monitor
'';
})
|
can this be closed because #295101 was merged? |
If it's already added and it works, then I think we can safely close this issue |
@pluiedev it does not work without https://github.com/nix-community/nix-vscode-extensions Either |
Project description
C# Dev Kit helps you manage your code with a solution explorer and test your code with integrated unit test discovery and execution.
Builds on top of ms-dotnettools.csharp which is already packaged.
I tried:
but it fails to build:
I have no idea about vscode extension packaging.
Plus, like many other vscode extensions, it cannot be installed directly from the marketplace because it tries to write to the nix store:
Metadata
Priorities
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: