diff --git a/pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix b/pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix index f1ce06b7ca0f..3c20aa299b6e 100644 --- a/pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix +++ b/pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix @@ -2,20 +2,14 @@ # - # - { lib, gccStdenv, vscode-utils -, jq, autoPatchelfHook, bash, makeWrapper -, dotnet-sdk_3, curl, gcc, icu, libkrb5, libsecret, libunwind, libX11, lttng-ust, openssl, util-linux, zlib -, desktop-file-utils, xprop, xsel +, autoPatchelfHook, bash, makeWrapper +, curl, gcc, libsecret, libunwind, libX11, lttng-ust, util-linux +, desktop-file-utils, xsel }: let # https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually libs = [ - # .NET Core - openssl - libkrb5 - zlib - icu - # Credential Storage libsecret @@ -36,91 +30,20 @@ in ((vscode-utils.override { stdenv = gccStdenv; }).buildVscodeMarketplaceExtens mktplcRef = { name = "vsliveshare"; publisher = "ms-vsliveshare"; - version = "1.0.5043"; - sha256 = "OdFOFvidUV/trySHvF8iELPNVP2kq8+vZQ4q4Nf7SiQ="; + version = "1.0.5834"; + sha256 = "sha256-+KfivY8W1VtUxhdXuUKI5e1elo6Ert1Tsf4xVXsKB3Y="; }; -}).overrideAttrs({ nativeBuildInputs ? [], buildInputs ? [], ... }: { - nativeBuildInputs = nativeBuildInputs ++ [ - jq - autoPatchelfHook - makeWrapper - ]; +}).overrideAttrs({ buildInputs ? [], ... }: { buildInputs = buildInputs ++ libs; # Using a patch file won't work, because the file changes too often, causing the patch to fail on most updates. # Rather than patching the calls to functions, we modify the functions to return what we want, # which is less likely to break in the future. postPatch = '' - sed -i \ - -e 's/updateExecutablePermissionsAsync() {/& return;/' \ - -e 's/isInstallCorrupt(traceSource, manifest) {/& return false;/' \ - out/prod/extension-prod.js - - declare ext_unique_id - ext_unique_id="$(basename "$out")" - - # Fix extension attempting to write to 'modifiedInternalSettings.json'. - # Move this write to the tmp directory indexed by the nix store basename. - substituteInPlace out/prod/extension-prod.js \ - --replace "path.resolve(constants_1.EXTENSION_ROOT_PATH, './modifiedInternalSettings.json')" \ - "path.join(os.tmpdir(), '$ext_unique_id-modifiedInternalSettings.json')" - - # Fix extension attempting to write to 'vsls-agent.lock'. - # Move this write to the tmp directory indexed by the nix store basename. - substituteInPlace out/prod/extension-prod.js \ - --replace "path + '.lock'" \ - "__webpack_require__('path').join(__webpack_require__('os').tmpdir(), '$ext_unique_id-vsls-agent.lock')" - - # Hardcode executable paths - echo '#!/bin/sh' >node_modules/@vsliveshare/vscode-launcher-linux/check-reqs.sh - substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/install.sh \ - --replace desktop-file-install ${desktop-file-utils}/bin/desktop-file-install - substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/uninstall.sh \ - --replace update-desktop-database ${desktop-file-utils}/bin/update-desktop-database - substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/vsls-launcher \ - --replace /bin/bash ${bash}/bin/bash - substituteInPlace out/prod/extension-prod.js \ - --replace xprop ${xprop}/bin/xprop \ + substituteInPlace extension.js \ --replace "'xsel'" "'${xsel}/bin/xsel'" ''; - postInstall = '' - cd $out/share/vscode/extensions/ms-vsliveshare.vsliveshare - - bash -s <