Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #220704 from mdarocha/vsliveshare-update

vscode-extensions.ms-vsliveshare.vsliveshare: 1.0.5043 -> 1.0.5834

authored by superherointj and committed by GitHub d42e0cfa 7be86f22

+7 -85
+7 -84
pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix
··· 2 2 # - <https://github.com/msteen/nixos-vsliveshare/blob/master/pkgs/vsliveshare/default.nix> 3 3 # - <https://github.com/NixOS/nixpkgs/issues/41189> 4 4 { lib, gccStdenv, vscode-utils 5 - , jq, autoPatchelfHook, bash, makeWrapper 6 - , dotnet-sdk_3, curl, gcc, icu, libkrb5, libsecret, libunwind, libX11, lttng-ust, openssl, util-linux, zlib 7 - , desktop-file-utils, xprop, xsel 5 + , autoPatchelfHook, bash, makeWrapper 6 + , curl, gcc, libsecret, libunwind, libX11, lttng-ust, util-linux 7 + , desktop-file-utils, xsel 8 8 }: 9 9 10 10 let 11 11 # https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually 12 12 libs = [ 13 - # .NET Core 14 - openssl 15 - libkrb5 16 - zlib 17 - icu 18 - 19 13 # Credential Storage 20 14 libsecret 21 15 ··· 36 30 mktplcRef = { 37 31 name = "vsliveshare"; 38 32 publisher = "ms-vsliveshare"; 39 - version = "1.0.5043"; 40 - sha256 = "OdFOFvidUV/trySHvF8iELPNVP2kq8+vZQ4q4Nf7SiQ="; 33 + version = "1.0.5834"; 34 + sha256 = "sha256-+KfivY8W1VtUxhdXuUKI5e1elo6Ert1Tsf4xVXsKB3Y="; 41 35 }; 42 - }).overrideAttrs({ nativeBuildInputs ? [], buildInputs ? [], ... }: { 43 - nativeBuildInputs = nativeBuildInputs ++ [ 44 - jq 45 - autoPatchelfHook 46 - makeWrapper 47 - ]; 36 + }).overrideAttrs({ buildInputs ? [], ... }: { 48 37 buildInputs = buildInputs ++ libs; 49 38 50 39 # Using a patch file won't work, because the file changes too often, causing the patch to fail on most updates. 51 40 # Rather than patching the calls to functions, we modify the functions to return what we want, 52 41 # which is less likely to break in the future. 53 42 postPatch = '' 54 - sed -i \ 55 - -e 's/updateExecutablePermissionsAsync() {/& return;/' \ 56 - -e 's/isInstallCorrupt(traceSource, manifest) {/& return false;/' \ 57 - out/prod/extension-prod.js 58 - 59 - declare ext_unique_id 60 - ext_unique_id="$(basename "$out")" 61 - 62 - # Fix extension attempting to write to 'modifiedInternalSettings.json'. 63 - # Move this write to the tmp directory indexed by the nix store basename. 64 - substituteInPlace out/prod/extension-prod.js \ 65 - --replace "path.resolve(constants_1.EXTENSION_ROOT_PATH, './modifiedInternalSettings.json')" \ 66 - "path.join(os.tmpdir(), '$ext_unique_id-modifiedInternalSettings.json')" 67 - 68 - # Fix extension attempting to write to 'vsls-agent.lock'. 69 - # Move this write to the tmp directory indexed by the nix store basename. 70 - substituteInPlace out/prod/extension-prod.js \ 71 - --replace "path + '.lock'" \ 72 - "__webpack_require__('path').join(__webpack_require__('os').tmpdir(), '$ext_unique_id-vsls-agent.lock')" 73 - 74 - # Hardcode executable paths 75 - echo '#!/bin/sh' >node_modules/@vsliveshare/vscode-launcher-linux/check-reqs.sh 76 - substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/install.sh \ 77 - --replace desktop-file-install ${desktop-file-utils}/bin/desktop-file-install 78 - substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/uninstall.sh \ 79 - --replace update-desktop-database ${desktop-file-utils}/bin/update-desktop-database 80 - substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/vsls-launcher \ 81 - --replace /bin/bash ${bash}/bin/bash 82 - substituteInPlace out/prod/extension-prod.js \ 83 - --replace xprop ${xprop}/bin/xprop \ 43 + substituteInPlace extension.js \ 84 44 --replace "'xsel'" "'${xsel}/bin/xsel'" 85 - ''; 86 - 87 - postInstall = '' 88 - cd $out/share/vscode/extensions/ms-vsliveshare.vsliveshare 89 - 90 - bash -s <<ENDSUBSHELL 91 - shopt -s extglob 92 - 93 - # A workaround to prevent the journal filling up due to diagnostic logging. 94 - # See: https://github.com/MicrosoftDocs/live-share/issues/1272 95 - # See: https://unix.stackexchange.com/questions/481799/how-to-prevent-a-process-from-writing-to-the-systemd-journal 96 - gcc -fPIC -shared -ldl -o dotnet_modules/noop-syslog.so ${./noop-syslog.c} 97 - 98 - # Normally the copying of the right executables is done externally at a later time, 99 - # but we want it done at installation time. 100 - cp dotnet_modules/exes/linux-x64/* dotnet_modules 101 - 102 - # The required executables are already copied over, 103 - # and the other runtimes won't be used and thus are just a waste of space. 104 - rm -r dotnet_modules/exes dotnet_modules/runtimes/!(linux-x64|unix) 105 - 106 - # Not all executables and libraries are executable, so make sure that they are. 107 - jq <package.json '.executables.linux[]' -r | xargs chmod +x 108 - 109 - # Lock the extension downloader. 110 - touch install-linux.Lock externalDeps-linux.Lock 111 - ENDSUBSHELL 112 - ''; 113 - 114 - postFixup = '' 115 - # We cannot use `wrapProgram`, because it will generate a relative path, 116 - # which will break when copying over the files. 117 - mv dotnet_modules/vsls-agent{,-wrapped} 118 - makeWrapper $PWD/dotnet_modules/vsls-agent{-wrapped,} \ 119 - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libs}" \ 120 - --set LD_PRELOAD $PWD/dotnet_modules/noop-syslog.so \ 121 - --set DOTNET_ROOT ${dotnet-sdk_3} 122 45 ''; 123 46 124 47 meta = with lib; {
-1
pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/noop-syslog.c
··· 1 - void syslog(int priority, const char *format, ...) { }