default.nix (3009B)
1 { stdenv 2 , vscode-utils 3 , autoPatchelfHook 4 , /*icu, curl, lttng-ust,*/ xorg 5 , gnome3 6 , utillinux 7 , openssl 8 , icu 9 , zlib 10 , curl 11 , lttng-ust 12 , libsecret 13 , libkrb5 14 , gcc 15 , libunwind 16 , binutils 17 }: 18 let 19 runtimeVersion = "2.1.1"; 20 runtimeHash = "6985b9f6844d51ba1197c3f52aabc7291bb15bc1"; 21 runtime = fetchTarball { 22 url = "https://download.microsoft.com/download/9/3/E/93ED35C8-57B9-4D50-AE32-0330111B38E8/dotnet-runtime-${runtimeVersion}-linux-x64.tar.gz"; 23 sha256 = "1g754mpwznmxlml5vnbxlm7v253al2m5jwzfvd7hj74f45yx8amf"; 24 }; 25 rpath = lib.makeLibraryPath [ utillinux openssl icu zlib curl lttng-ust libsecret libkrb5 gcc.cc.lib libunwind binutils.bintools_bin ]; 26 in 27 ( 28 vscode-utils.buildVscodeMarketplaceExtension { 29 mktplcRef = { 30 name = "vsliveshare"; 31 publisher = "ms-vsliveshare"; 32 version = "0.3.504"; 33 sha256 = "1y24q5id9hkgdndh2v8z1rpw736bi16yk66n260s44qd3w5yss8r"; 34 }; 35 } 36 ).overrideAttrs ( 37 attrs: 38 { 39 buildInputs = attrs.buildInputs 40 ++ [ autoPatchelfHook ] 41 ++ [ icu curl lttng-ust xorg.libX11 ]; 42 43 installPhase = attrs.installPhase + '' 44 45 runHook postInstall 46 ''; 47 48 postInstall = '' 49 bash -s <<ENDSUBSHELL 50 shopt -s extglob 51 cd $out/share/*/extensions/* 52 cp \ 53 "${runtime}"/shared/Microsoft.NETCore.App/2.1.1/* \ 54 dotnet_modules/runtimes/linux-x64/!(native) \ 55 dotnet_modules/runtimes/linux-x64/native/* \ 56 dotnet_modules/runtimes/unix/lib/netstandard1.3/* \ 57 "dotnet_modules" 58 chmod +x \ 59 dotnet_modules/vsls-agent \ 60 dotnet_modules/Microsoft.Cascade.VSCodeAdapter \ 61 dotnet_modules/createdump \ 62 dotnet_modules/Microsoft.Cascade.VSCodeHostAdapter \ 63 dotnet_modules/runtimes/linux-x64/vsls-agent \ 64 dotnet_modules/runtimes/linux-x64/Microsoft.Cascade.VSCodeHostAdapter \ 65 dotnet_modules/runtimes/linux-x64/Microsoft.Cascade.VSCodeAdapter \ 66 67 touch "install.Lock" 68 cat <<EOF > dotnet_modules/.version 69 ${runtimeHash} 70 ${runtimeVersion} 71 EOF 72 sed -i out/src/launcher.js \ 73 -e "s|path.join(Launcher.extensionRootPath, 'cascade.json')|'/tmp/cascade.json'|" 74 sed -i out/src/extension.js \ 75 -e "s|yield downloader_1.ExternalDownloader.ensureRuntimeDependenciesAsync(liveShareExtension)|downloader_1.EnsureRuntimeDependenciesResult.Success|" \ 76 -e "s|yield downloader_1.isInstallCorrupt(traceSource_1.traceSource)|false|" 77 sed -i out/src/internalConfig.js \ 78 -e "s|path.join(__dirname, '..', '..', 'modifiedInternalSettings.json')|'/tmp/modifiedInternalSettings.json'|" 79 ENDSUBSHELL 80 ''; 81 82 #-e "s|launcher_1.Launcher.safelyDeleteCascadeUrlFile();||" \ 83 #-e "s|yield launcher_1.Launcher.readCascadeURL()|void 0|" \ 84 85 postFixup = '' 86 cd $out/share/*/extensions/* 87 find . -iname '*.so' -ls -exec patchelf --set-rpath ${rpath} '{}' \; 88 ''; 89 90 propagatedBuildInputs = with gnome3; [ gnome-keyring ]; 91 } 92 )