diff --git a/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/default.nix b/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/default.nix index 7d6318ca2093..9f53c83a95d2 100644 --- a/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/default.nix +++ b/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, + fetchzip, vscode-utils, autoPatchelfHook, icu, @@ -17,29 +18,41 @@ let { x86_64-linux = { arch = "linux-x64"; - hash = "sha256-PlA1uuudUPnKCas5brviS8ZMDweFEdti6N5fu8XCzvY="; + hash = "sha256-FPhB2oWx5x/qr2k4sAg8w2Wx+LvW/Syfc/u8nnTCQFU="; }; aarch64-linux = { arch = "linux-arm64"; - hash = "sha256-DyOT9AZAdW48G7SZfiFdveY9JwZDZjtT4Mp/LYY2JRk="; + hash = "sha256-qVZ9Go+/mVIoUr8Qt/kJv8gvOWd7NLu1wk7YZ2v6Lw8="; }; x86_64-darwin = { arch = "darwin-x64"; - hash = "sha256-vew5YkrX7soPNiYO+KX5Uy2HOiJ701YWWZULtH5Aq+I="; + hash = "sha256-7G9t84clyi4T3k7FxoPIfaIs4VabBTvGilTptd3AHOw="; }; aarch64-darwin = { arch = "darwin-arm64"; - hash = "sha256-rc6KVNZWNJYt8RkbqyPB4Q7aJB6jtlWMsd4UHGbqsoI="; + hash = "sha256-fmWlcLVUUY6Ekx5mtsBYFrYFdXpSUg8PctDBUovETV4="; }; } .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}") ); + + # Get url from runtimeDependencies in package.json + # TODO: Automate fetching runtimeDependencies from package.json + # ideally should be done at the vscode-extensions level for + # everyone to reuse. + roslyn-copilot = fetchzip { + url = "https://roslyn.blob.core.windows.net/releases/Microsoft.VisualStudio.Copilot.Roslyn.LanguageServer-18.0.479-alpha.zip"; + hash = "sha256-xq66gY3N3/R9bG6XWqLy53T/ExzGdZi3ZBNEzYAeqM8="; + postFetch = '' + touch install.Lock + ''; + }; in vscode-utils.buildVscodeMarketplaceExtension { mktplcRef = { name = "csharp"; publisher = "ms-dotnettools"; - version = "2.87.31"; + version = "2.89.19"; inherit (extInfo) hash arch; }; @@ -62,6 +75,10 @@ vscode-utils.buildVscodeMarketplaceExtension { --replace-fail 'uname -m' '${lib.getExe' coreutils "uname"} -m' ''; + postInstall = '' + ln -s ${roslyn-copilot} "$out"/share/vscode/extensions/ms-dotnettools.csharp/.roslynCopilot + ''; + preFixup = '' ( set -euo pipefail