From 8f868e154ca265e38481ab15d28429f7ff72e0e4 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Wed, 16 Feb 2022 14:20:53 -0300 Subject: Move misc/vscode-extensions to applications/editors/vscode/extensions --- .../extensions/_maintainers/update-bin-srcs-lib.sh | 160 ++ .../editors/vscode/extensions/cpptools/default.nix | 99 + .../vscode/extensions/cpptools/missing_elf_deps.sh | 52 + .../cpptools/package-activation-events.json | 25 + .../vscode/extensions/cpptools/update_helper.sh | 168 ++ .../editors/vscode/extensions/default.nix | 2213 ++++++++++++++++++++ .../editors/vscode/extensions/language-packs.nix | 89 + .../vscode/extensions/mktplcExtRefToFetchArgs.nix | 8 + .../extensions/ms-dotnettools-csharp/default.nix | 152 ++ .../ms-dotnettools-csharp/rt-deps-bin-srcs.json | 94 + .../ms-dotnettools-csharp/update-bin-srcs | 21 + .../extensions/ms-toolsai-jupyter/default.nix | 42 + .../ms-vsliveshare-vsliveshare/default.nix | 134 ++ .../ms-vsliveshare-vsliveshare/noop-syslog.c | 1 + .../editors/vscode/extensions/python/default.nix | 128 ++ .../vscode/extensions/python/extract-nuget.nix | 15 + .../vscode/extensions/remote-ssh/default.nix | 54 + .../editors/vscode/extensions/rescript/default.nix | 28 + .../rescript/rescript-editor-analysis.nix | 31 + .../rust-analyzer/build-deps/package.json | 26 + .../vscode/extensions/rust-analyzer/default.nix | 88 + .../vscode/extensions/terraform/default.nix | 20 + .../extensions/terraform/fix-terraform-ls.patch | 19 + .../editors/vscode/extensions/updateSettings.nix | 39 + .../vscode/extensions/updateSettingsTest.nix | 6 + .../vscode/extensions/update_installed_exts.sh | 90 + .../extensions/vscode-lldb/build-deps/package.json | 23 + .../vscode-lldb/cmake-build-extension-only.patch | 36 + .../vscode/extensions/vscode-lldb/default.nix | 104 + .../editors/vscode/extensions/vscode-lldb/lldb.nix | 23 + .../vscode-lldb/reset-cargo-config.patch | 19 + .../vscode/extensions/vscode-lldb/update.sh | 44 + .../editors/vscode/extensions/vscode-utils.nix | 100 + .../editors/vscode/extensions/vscodeEnv.nix | 86 + .../editors/vscode/extensions/vscodeEnvTest.nix | 11 + .../editors/vscode/extensions/vscodeExts2nix.nix | 44 + .../vscode/extensions/vscodeWithConfiguration.nix | 54 + .../editors/vscode/extensions/wakatime/default.nix | 22 + pkgs/development/node-packages/node-packages.json | 4 +- pkgs/development/node-packages/node-packages.nix | 8 +- .../_maintainers/update-bin-srcs-lib.sh | 160 -- pkgs/misc/vscode-extensions/cpptools/default.nix | 99 - .../vscode-extensions/cpptools/missing_elf_deps.sh | 52 - .../cpptools/package-activation-events.json | 25 - .../vscode-extensions/cpptools/update_helper.sh | 168 -- pkgs/misc/vscode-extensions/default.nix | 2213 -------------------- pkgs/misc/vscode-extensions/language-packs.nix | 89 - .../vscode-extensions/mktplcExtRefToFetchArgs.nix | 8 - .../ms-dotnettools-csharp/default.nix | 152 -- .../ms-dotnettools-csharp/rt-deps-bin-srcs.json | 94 - .../ms-dotnettools-csharp/update-bin-srcs | 21 - .../ms-toolsai-jupyter/default.nix | 42 - .../ms-vsliveshare-vsliveshare/default.nix | 134 -- .../ms-vsliveshare-vsliveshare/noop-syslog.c | 1 - pkgs/misc/vscode-extensions/python/default.nix | 128 -- .../vscode-extensions/python/extract-nuget.nix | 15 - pkgs/misc/vscode-extensions/remote-ssh/default.nix | 54 - pkgs/misc/vscode-extensions/rescript/default.nix | 28 - .../rescript/rescript-editor-analysis.nix | 31 - .../rust-analyzer/build-deps/package.json | 26 - .../vscode-extensions/rust-analyzer/default.nix | 88 - pkgs/misc/vscode-extensions/terraform/default.nix | 20 - .../terraform/fix-terraform-ls.patch | 19 - pkgs/misc/vscode-extensions/updateSettings.nix | 39 - pkgs/misc/vscode-extensions/updateSettingsTest.nix | 6 - .../vscode-extensions/update_installed_exts.sh | 90 - .../vscode-lldb/build-deps/package.json | 23 - .../vscode-lldb/cmake-build-extension-only.patch | 36 - .../misc/vscode-extensions/vscode-lldb/default.nix | 104 - pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix | 23 - .../vscode-lldb/reset-cargo-config.patch | 19 - pkgs/misc/vscode-extensions/vscode-lldb/update.sh | 44 - pkgs/misc/vscode-extensions/vscode-utils.nix | 100 - pkgs/misc/vscode-extensions/vscodeEnv.nix | 86 - pkgs/misc/vscode-extensions/vscodeEnvTest.nix | 11 - pkgs/misc/vscode-extensions/vscodeExts2nix.nix | 44 - .../vscode-extensions/vscodeWithConfiguration.nix | 54 - pkgs/misc/vscode-extensions/wakatime/default.nix | 22 - pkgs/top-level/all-packages.nix | 6 +- 79 files changed, 4377 insertions(+), 4377 deletions(-) create mode 100755 pkgs/applications/editors/vscode/extensions/_maintainers/update-bin-srcs-lib.sh create mode 100644 pkgs/applications/editors/vscode/extensions/cpptools/default.nix create mode 100755 pkgs/applications/editors/vscode/extensions/cpptools/missing_elf_deps.sh create mode 100644 pkgs/applications/editors/vscode/extensions/cpptools/package-activation-events.json create mode 100755 pkgs/applications/editors/vscode/extensions/cpptools/update_helper.sh create mode 100644 pkgs/applications/editors/vscode/extensions/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/language-packs.nix create mode 100644 pkgs/applications/editors/vscode/extensions/mktplcExtRefToFetchArgs.nix create mode 100644 pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json create mode 100755 pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/update-bin-srcs create mode 100644 pkgs/applications/editors/vscode/extensions/ms-toolsai-jupyter/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/noop-syslog.c create mode 100644 pkgs/applications/editors/vscode/extensions/python/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/python/extract-nuget.nix create mode 100644 pkgs/applications/editors/vscode/extensions/remote-ssh/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/rescript/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix create mode 100644 pkgs/applications/editors/vscode/extensions/rust-analyzer/build-deps/package.json create mode 100644 pkgs/applications/editors/vscode/extensions/rust-analyzer/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/terraform/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/terraform/fix-terraform-ls.patch create mode 100644 pkgs/applications/editors/vscode/extensions/updateSettings.nix create mode 100644 pkgs/applications/editors/vscode/extensions/updateSettingsTest.nix create mode 100755 pkgs/applications/editors/vscode/extensions/update_installed_exts.sh create mode 100644 pkgs/applications/editors/vscode/extensions/vscode-lldb/build-deps/package.json create mode 100644 pkgs/applications/editors/vscode/extensions/vscode-lldb/cmake-build-extension-only.patch create mode 100644 pkgs/applications/editors/vscode/extensions/vscode-lldb/default.nix create mode 100644 pkgs/applications/editors/vscode/extensions/vscode-lldb/lldb.nix create mode 100644 pkgs/applications/editors/vscode/extensions/vscode-lldb/reset-cargo-config.patch create mode 100755 pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh create mode 100644 pkgs/applications/editors/vscode/extensions/vscode-utils.nix create mode 100644 pkgs/applications/editors/vscode/extensions/vscodeEnv.nix create mode 100644 pkgs/applications/editors/vscode/extensions/vscodeEnvTest.nix create mode 100644 pkgs/applications/editors/vscode/extensions/vscodeExts2nix.nix create mode 100644 pkgs/applications/editors/vscode/extensions/vscodeWithConfiguration.nix create mode 100644 pkgs/applications/editors/vscode/extensions/wakatime/default.nix delete mode 100755 pkgs/misc/vscode-extensions/_maintainers/update-bin-srcs-lib.sh delete mode 100644 pkgs/misc/vscode-extensions/cpptools/default.nix delete mode 100755 pkgs/misc/vscode-extensions/cpptools/missing_elf_deps.sh delete mode 100644 pkgs/misc/vscode-extensions/cpptools/package-activation-events.json delete mode 100755 pkgs/misc/vscode-extensions/cpptools/update_helper.sh delete mode 100644 pkgs/misc/vscode-extensions/default.nix delete mode 100644 pkgs/misc/vscode-extensions/language-packs.nix delete mode 100644 pkgs/misc/vscode-extensions/mktplcExtRefToFetchArgs.nix delete mode 100644 pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix delete mode 100644 pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json delete mode 100755 pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs delete mode 100644 pkgs/misc/vscode-extensions/ms-toolsai-jupyter/default.nix delete mode 100644 pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix delete mode 100644 pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/noop-syslog.c delete mode 100644 pkgs/misc/vscode-extensions/python/default.nix delete mode 100644 pkgs/misc/vscode-extensions/python/extract-nuget.nix delete mode 100644 pkgs/misc/vscode-extensions/remote-ssh/default.nix delete mode 100644 pkgs/misc/vscode-extensions/rescript/default.nix delete mode 100644 pkgs/misc/vscode-extensions/rescript/rescript-editor-analysis.nix delete mode 100644 pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json delete mode 100644 pkgs/misc/vscode-extensions/rust-analyzer/default.nix delete mode 100644 pkgs/misc/vscode-extensions/terraform/default.nix delete mode 100644 pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch delete mode 100644 pkgs/misc/vscode-extensions/updateSettings.nix delete mode 100644 pkgs/misc/vscode-extensions/updateSettingsTest.nix delete mode 100755 pkgs/misc/vscode-extensions/update_installed_exts.sh delete mode 100644 pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json delete mode 100644 pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch delete mode 100644 pkgs/misc/vscode-extensions/vscode-lldb/default.nix delete mode 100644 pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix delete mode 100644 pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch delete mode 100755 pkgs/misc/vscode-extensions/vscode-lldb/update.sh delete mode 100644 pkgs/misc/vscode-extensions/vscode-utils.nix delete mode 100644 pkgs/misc/vscode-extensions/vscodeEnv.nix delete mode 100644 pkgs/misc/vscode-extensions/vscodeEnvTest.nix delete mode 100644 pkgs/misc/vscode-extensions/vscodeExts2nix.nix delete mode 100644 pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix delete mode 100644 pkgs/misc/vscode-extensions/wakatime/default.nix diff --git a/pkgs/applications/editors/vscode/extensions/_maintainers/update-bin-srcs-lib.sh b/pkgs/applications/editors/vscode/extensions/_maintainers/update-bin-srcs-lib.sh new file mode 100755 index 00000000000..e3d1e5fb139 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/_maintainers/update-bin-srcs-lib.sh @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +prefetchExtensionZip() { + declare publisher="${1?}" + declare name="${2?}" + declare version="${3?}" + + 1>&2 echo + 1>&2 echo "------------- Downloading extension ---------------" + + declare extZipStoreName="${publisher}-${name}.zip" + declare extUrl="https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"; + 1>&2 echo "extUrl='$extUrl'" + declare nixPrefetchArgs=( --name "$extZipStoreName" --print-path "$extUrl" ) + + 1>&2 printf "$ nix-prefetch-url" + 1>&2 printf " %q" "${nixPrefetchArgs[@]}" + 1>&2 printf " 2> /dev/null\n" + declare zipShaWStorePath + zipShaWStorePath=$(nix-prefetch-url "${nixPrefetchArgs[@]}" 2> /dev/null) + + 1>&2 echo "zipShaWStorePath='$zipShaWStorePath'" + echo "$zipShaWStorePath" +} + + +prefetchExtensionUnpacked() { + declare publisher="${1?}" + declare name="${2?}" + declare version="${3?}" + + declare zipShaWStorePath + zipShaWStorePath="$(prefetchExtensionZip "$publisher" "$name" "$version")" + + declare zipStorePath + zipStorePath="$(echo "$zipShaWStorePath" | tail -n1)" + 1>&2 echo "zipStorePath='$zipStorePath'" + + function rm_tmpdir() { + 1>&2 printf "rm -rf -- %q\n" "$tmpDir" + rm -rf -- "$tmpDir" + unset tmpDir + trap - INT TERM HUP EXIT + } + function make_trapped_tmpdir() { + tmpDir=$(mktemp -d) + trap rm_tmpdir INT TERM HUP EXIT + } + + 1>&2 echo + 1>&2 echo "------------- Unpacking extension ---------------" + + make_trapped_tmpdir + declare unzipArgs=( -q -d "$tmpDir" "$zipStorePath" ) + 1>&2 printf "$ unzip" + 1>&2 printf " %q" "${unzipArgs[@]}" + 1>&2 printf "\n" + unzip "${unzipArgs[@]}" + + declare unpackedStoreName="${publisher}-${name}" + + declare unpackedStorePath + unpackedStorePath="$(nix add-to-store -n "$unpackedStoreName" "$tmpDir")" + declare unpackedSha256 + unpackedSha256="$(nix hash-path --base32 --type sha256 "$unpackedStorePath")" + 1>&2 echo "unpackedStorePath='$unpackedStorePath'" + 1>&2 echo "unpackedSha256='$unpackedSha256'" + + rm_tmpdir + + echo "$unpackedSha256" + echo "$unpackedStorePath" +} + + +prefetchExtensionJson() { + declare publisher="${1?}" + declare name="${2?}" + declare version="${3?}" + + declare unpackedShaWStorePath + unpackedShaWStorePath="$(prefetchExtensionUnpacked "$publisher" "$name" "$version")" + + declare unpackedStorePath + unpackedStorePath="$(echo "$unpackedShaWStorePath" | tail -n1)" + 1>&2 echo "unpackedStorePath='$unpackedStorePath'" + + declare jsonShaWStorePath + jsonShaWStorePath=$(nix-prefetch-url --print-path "file://${unpackedStorePath}/extension/package.json" 2> /dev/null) + + 1>&2 echo "jsonShaWStorePath='$jsonShaWStorePath'" + echo "$jsonShaWStorePath" +} + + +formatExtRuntimeDeps() { + declare publisher="${1?}" + declare name="${2?}" + declare version="${3?}" + + declare jsonShaWStorePath + jsonShaWStorePath="$(prefetchExtensionJson "$publisher" "$name" "$version")" + + declare jsonStorePath + jsonStorePath="$(echo "$jsonShaWStorePath" | tail -n1)" + 1>&2 echo "jsonStorePath='$jsonStorePath'" + + # Assume packages without an architectures are for x86_64 and remap arm64 to aarch64. + declare jqQuery + jqQuery=$(cat <<'EOF' +.runtimeDependencies +| map(select(.platforms[] | in({"linux": null, "darwin": null}))) +| map(select(.architectures == null).architectures |= ["x86_64"]) +| map(del(.architectures[] | select(. | in({"x86_64": null, "arm64": null}) | not))) +| map((.architectures[] | select(. == "arm64")) |= "aarch64") +| map(select(.architectures != [])) +| .[] | { + (.id + "__" + (.architectures[0]) + "-" + (.platforms[0])): + {installPath, binaries, urls: [.url, .fallbackUrl] | map(select(. != null))} +} +EOF +) + + 1>&2 printf "$ cat %q | jq '%s'\n" "$jsonStorePath" "$jqQuery" + cat "$jsonStorePath" | jq "$jqQuery" +} + + +computeExtRtDepChecksum() { + declare rtDepJsonObject="${1?}" + declare url + url="$(echo "$rtDepJsonObject" | jq -j '.[].urls[0]')" + declare sha256 + 1>&2 printf "$ nix-prefetch-url '%s'\n" "$url" + sha256="$(nix-prefetch-url "$url")" + 1>&2 echo "$sha256" + echo "$sha256" +} + + +computeAndAttachExtRtDepsChecksums() { + while read -r rtDepJsonObject; do + declare sha256 + sha256="$(computeExtRtDepChecksum "$rtDepJsonObject")" + echo "$rtDepJsonObject" | jq --arg sha256 "$sha256" '.[].sha256 = $sha256' + done < <(cat - | jq -c '.') +} + + +jqStreamToJson() { + cat - | jq --slurp '. | add' +} + + +jsonToNix() { + # TODO: Replacing this non functional stuff with a proper json to nix + # implementation would allow us to produce a 'rt-deps-bin-srcs.nix' file instead. + false + cat - | sed -E -e 's/": /" = /g' -e 's/,$/;/g' -e 's/ }$/ };/g' -e 's/ ]$/ ];/g' +} diff --git a/pkgs/applications/editors/vscode/extensions/cpptools/default.nix b/pkgs/applications/editors/vscode/extensions/cpptools/default.nix new file mode 100644 index 00000000000..077c3807eca --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/cpptools/default.nix @@ -0,0 +1,99 @@ +{ lib, vscode-utils +, fetchurl, mono, writeScript, runtimeShell +, jq, clang-tools +, gdbUseFixed ? true, gdb # The gdb default setting will be fixed to specified. Use version from `PATH` otherwise. +}: + +/* + Note that this version of the extension still has some nix specific issues + which could not be fixed merely by patching (inside a C# dll). + + In particular, the debugger requires either gnome-terminal or xterm. However + instead of looking for the terminal executable in `PATH`, for any linux platform + the dll uses an hardcoded path to one of these. + + So, in order for debugging to work properly, you merely need to create symlinks + to one of these terminals at the appropriate location. + + The good news is the the utility library is open source and with some effort + we could build a patched version ourselves. See: + + + + Also, the extension should eventually no longer require an external terminal. See: + + + + Once the symbolic link temporary solution taken, everything shoud run smootly. +*/ + +let + gdbDefaultsTo = if gdbUseFixed then "${gdb}/bin/gdb" else "gdb"; + + + openDebugAD7Script = writeScript "OpenDebugAD7" '' + #!${runtimeShell} + BIN_DIR="$(cd "$(dirname "$0")" && pwd -P)" + ${if gdbUseFixed + then '' + export PATH=''${PATH}''${PATH:+:}${gdb}/bin + '' + else ""} + ${mono}/bin/mono $BIN_DIR/bin/OpenDebugAD7.exe $* + ''; +in + +vscode-utils.buildVscodeMarketplaceExtension rec { + mktplcRef = { + name = "cpptools"; + publisher = "ms-vscode"; + version = "1.7.1"; + }; + + vsix = fetchurl { + name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; + url = "https://github.com/microsoft/vscode-cpptools/releases/download/${mktplcRef.version}/cpptools-linux.vsix"; + sha256 = "sha256-LqndG/vv8LgVPEX6dGkikDB6M6ISneo2UJ78izXVFbk="; + }; + + buildInputs = [ + jq + ]; + + postPatch = '' + mv ./package.json ./package_orig.json + + # 1. Add activation events so that the extension is functional. This listing is empty when unpacking the extension but is filled at runtime. + # 2. Patch `package.json` so that nix's *gdb* is used as default value for `miDebuggerPath`. + cat ./package_orig.json | \ + jq --slurpfile actEvts ${./package-activation-events.json} '(.activationEvents) = $actEvts[0]' | \ + jq '(.contributes.debuggers[].configurationAttributes | .attach , .launch | .properties.miDebuggerPath | select(. != null) | select(.default == "/usr/bin/gdb") | .default) = "${gdbDefaultsTo}"' > \ + ./package.json + + # Prevent download/install of extensions + touch "./install.lock" + + # Mono runtimes from nix package (used by generated `OpenDebugAD7`). + mv ./debugAdapters/bin/OpenDebugAD7 ./debugAdapters/bin/OpenDebugAD7_orig + cp -p "${openDebugAD7Script}" "./debugAdapters/bin/OpenDebugAD7" + + # Clang-format from nix package. + mv ./LLVM/ ./LLVM_orig + mkdir "./LLVM/" + find "${clang-tools}" -mindepth 1 -maxdepth 1 | xargs ln -s -t "./LLVM" + + # Patching cpptools and cpptools-srv + elfInterpreter="$(cat $NIX_CC/nix-support/dynamic-linker)" + patchelf --set-interpreter "$elfInterpreter" ./bin/cpptools + patchelf --set-interpreter "$elfInterpreter" ./bin/cpptools-srv + chmod a+x ./bin/cpptools{-srv,} + ''; + + meta = with lib; { + license = licenses.unfree; + maintainers = [ maintainers.jraygauthier ]; + # A 32 bit linux would also be possible with some effort (specific download of binaries + + # patching of the elf files with 32 bit interpreter). + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/cpptools/missing_elf_deps.sh b/pkgs/applications/editors/vscode/extensions/cpptools/missing_elf_deps.sh new file mode 100755 index 00000000000..f5eb08d78a5 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/cpptools/missing_elf_deps.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env nix-shell +#! nix-shell -p coreutils -i bash + +scriptDir=$(cd "`dirname "$0"`"; pwd) +echo "scriptDir='$scriptDir'" + +function get_pkg_out() { + local pkg="$1" + local suffix="${2:-}" + local nixExp="with (import {}); ${pkg}" + echo "$(nix-build -E "$nixExp" --no-out-link)${suffix}" +} + +interpreter="$(get_pkg_out "stdenv.glibc" "/lib/ld-linux-x86-64.so.2")" +echo "interpreter='$interpreter'" + +# For clangformat dep on 'libtinfo.so.5'. +ncursesLibDir="$(get_pkg_out "ncurses5.out" "/lib")" +echo "ncursesLibDir='$ncursesLibDir'" + +# For clanformat dep on 'libstdc++.so.6'. +stdcppLibDir="$(get_pkg_out "stdenv.cc.cc.lib" "/lib")" +echo "stdcppLibDir='$stdcppLibDir'" + +# For clangformat dep on 'libz.so.1'. +zlibLibDir="$(get_pkg_out "zlib.out" "/lib")" +echo "zlibLibDir='$zlibLibDir'" + +function patchelf_mono() { + local exe="$1" + patchelf --set-interpreter "$interpreter" "$exe" +} + +function patchelf_clangformat() { + local exe="$1" + patchelf --set-interpreter "$interpreter" "$exe" + local rpath="$ncursesLibDir:$stdcppLibDir:$zlibLibDir" + patchelf --set-rpath "$rpath" "$exe" +} + +function print_nix_version_clangtools() { + nixClangToolsBin="$(get_pkg_out "clang-tools" "/bin")" + echo "nixClangToolsBin='$nixClangToolsBin'" + $nixClangToolsBin/clang-format --version +} + +function print_nix_version_mono() { + nixMonoBin="$(get_pkg_out "mono" "/bin")" + echo "nixMonoBin='$nixMonoBin'" + $nixMonoBin/mono --version +} + diff --git a/pkgs/applications/editors/vscode/extensions/cpptools/package-activation-events.json b/pkgs/applications/editors/vscode/extensions/cpptools/package-activation-events.json new file mode 100644 index 00000000000..c2d8a10f340 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/cpptools/package-activation-events.json @@ -0,0 +1,25 @@ +[ + "onLanguage:cpp", + "onLanguage:c", + "onCommand:extension.pickNativeProcess", + "onCommand:extension.pickRemoteNativeProcess", + "onCommand:C_Cpp.ConfigurationEdit", + "onCommand:C_Cpp.ConfigurationSelect", + "onCommand:C_Cpp.ConfigurationProviderSelect", + "onCommand:C_Cpp.SwitchHeaderSource", + "onCommand:C_Cpp.Navigate", + "onCommand:C_Cpp.GoToDeclaration", + "onCommand:C_Cpp.PeekDeclaration", + "onCommand:C_Cpp.ToggleErrorSquiggles", + "onCommand:C_Cpp.ToggleIncludeFallback", + "onCommand:C_Cpp.ToggleDimInactiveRegions", + "onCommand:C_Cpp.ToggleSnippets", + "onCommand:C_Cpp.ShowReleaseNotes", + "onCommand:C_Cpp.ResetDatabase", + "onCommand:C_Cpp.PauseParsing", + "onCommand:C_Cpp.ResumeParsing", + "onCommand:C_Cpp.ShowParsingCommands", + "onCommand:C_Cpp.TakeSurvey", + "onDebug", + "workspaceContains:/.vscode/c_cpp_properties.json" +] diff --git a/pkgs/applications/editors/vscode/extensions/cpptools/update_helper.sh b/pkgs/applications/editors/vscode/extensions/cpptools/update_helper.sh new file mode 100755 index 00000000000..00ef7755324 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/cpptools/update_helper.sh @@ -0,0 +1,168 @@ +#!/usr/bin/env nix-shell +#! nix-shell -p coreutils -p jq -p unzip -i bash +set -euo pipefail + +# +# A little script to help maintaining this package. It will: +# +# - download the specified version of the extension to the store and print its url, packed store path and hash +# - unpack the extension, bring it to the store and print its store path and hash +# - fetch its runtimes dependencies from the 'package.json' file using the 'jq' utility, unpack those to the store +# and print its url store path and hash +# - patch elf of the binaries that got a nix replacement +# - bring the patched version to the store +# - run their '--version' and call 'ldd' +# - print the version of the runtime deps nix replacements. +# +# TODO: Print to a properly formated nix file all the required information to fetch everything (extension + runtime deps). +# TODO: Print x86 and maybe darwin runtime dependencies. +# + +scriptDir=$(cd "`dirname "$0"`"; pwd) +echo "scriptDir='$scriptDir'" + +extPublisher="vscode" +extName="cpptools" +defaultExtVersion="0.16.1" +extVersion="${1:-$defaultExtVersion}" + +echo +echo "------------- Downloading extension ---------------" + +extZipStoreName="${extPublisher}-${extName}.zip" +extUrl="https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/cpptools/${extVersion}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" +echo "extUrl='$extUrl'" +storePathWithSha=$(nix-prefetch-url --name "$extZipStoreName" --print-path "$extUrl" 2> /dev/null) + +cpptoolsZipStorePath="$(echo "$storePathWithSha" | tail -n1)" +cpptoolsZipSha256="$(echo "$storePathWithSha" | head -n1)" +echo "cpptoolsZipStorePath='$cpptoolsZipStorePath'" +echo "cpptoolsZipSha256='$cpptoolsZipSha256'" + + +extStoreName="${extPublisher}-${extName}" + + +function rm_tmpdir() { + #echo "Removing \`tmpDir='$tmpDir'\`" + rm -rf -- "$tmpDir" + unset tmpDir + trap - INT TERM HUP EXIT +} +function make_trapped_tmpdir() { + tmpDir=$(mktemp -d) + trap rm_tmpdir INT TERM HUP EXIT +} + +echo +echo "------------- Unpacked extension ---------------" + +make_trapped_tmpdir +unzip -q -d "$tmpDir" "$cpptoolsZipStorePath" + +cpptoolsStorePath="$(nix add-to-store -n "$extStoreName" "$tmpDir")" +cpptoolsSha256="$(nix hash-path --base32 --type sha512 "$cpptoolsStorePath")" +echo "cpptoolsStorePath='$cpptoolsStorePath'" +echo "cpptoolsSha256='$cpptoolsSha256'" + +rm_tmpdir + +storePathWithSha=$(nix-prefetch-url --print-path "file://${cpptoolsStorePath}/extension/package.json" 2> /dev/null) + +extPackageJSONStorePath="$(echo "$storePathWithSha" | tail -n1)" +extPackageJSONSha256="$(echo "$storePathWithSha" | head -n1)" +echo "extPackageJSONStorePath='$extPackageJSONStorePath'" +echo "extPackageJSONSha256='$extPackageJSONSha256'" + +print_runtime_dep() { + + local outName="$1" + local extPackageJSONStorePath="$2" + local depDesc="$3" + + local urlRaw=$(cat "$extPackageJSONStorePath" | jq -r --arg desc "$depDesc" '.runtimeDependencies[] | select(.description == $desc) | .url') + local url=$(echo $urlRaw | xargs curl -Ls -o /dev/null -w %{url_effective}) + + local urlRawVarStr="${outName}_urlRaw='$urlRaw'" + local urlVarStr="${outName}_url='$url'" + echo "$urlRawVarStr" + echo "$urlVarStr" + + local storePathWithSha="$(nix-prefetch-url --unpack --print-path "$url" 2> /dev/null)" + + local storePath="$(echo "$storePathWithSha" | tail -n1)" + local sha256="$(echo "$storePathWithSha" | head -n1)" + + local sha256VarStr="${outName}_sha256='$sha256'" + local storePathVarStr="${outName}_storePath='$storePath'" + echo "$sha256VarStr" + echo "$storePathVarStr" + + eval "$urlRawVarStr" + eval "$urlVarStr" + eval "$sha256VarStr" + eval "$storePathVarStr" +} + +echo +echo "------------- Runtime dependencies ---------------" + +print_runtime_dep "langComponentBinaries" "$extPackageJSONStorePath" "C/C++ language components (Linux / x86_64)" +print_runtime_dep "monoRuntimeBinaries" "$extPackageJSONStorePath" "Mono Runtime (Linux / x86_64)" +print_runtime_dep "clanFormatBinaries" "$extPackageJSONStorePath" "ClangFormat (Linux / x86_64)" + + +echo +echo "------------- Runtime deps missing elf deps ---------------" + +source "$scriptDir/missing_elf_deps.sh" + +echo +echo "------------- Runtime dep mono ---------------" + +make_trapped_tmpdir +find "$monoRuntimeBinaries_storePath" -mindepth 1 -maxdepth 1 | xargs -d '\n' cp -rp -t "$tmpDir" +chmod -R a+rwx "$tmpDir" + +ls -la "$tmpDir/debugAdapters" + +patchelf_mono "$tmpDir/debugAdapters/mono.linux-x86_64" + +chmod a+x "$tmpDir/debugAdapters/mono.linux-x86_64" +ldd "$tmpDir/debugAdapters/mono.linux-x86_64" +"$tmpDir/debugAdapters/mono.linux-x86_64" --version + +monoRuntimeBinariesPatched_storePath="$(nix add-to-store -n "monoRuntimeBinariesPatched" "$tmpDir")" +echo "monoRuntimeBinariesPatched_storePath='$monoRuntimeBinariesPatched_storePath'" + +rm_tmpdir + + +echo +echo "------------- Runtime dep clang ---------------" +make_trapped_tmpdir +find "$clanFormatBinaries_storePath" -mindepth 1 -maxdepth 1 | xargs -d '\n' cp -rp -t "$tmpDir" +chmod -R a+rwx "$tmpDir" + +ls -la "$tmpDir/bin" + +patchelf_clangformat "$tmpDir/bin/clang-format" + +chmod a+x "$tmpDir/bin/clang-format" +ldd "$tmpDir/bin/clang-format" +"$tmpDir/bin/clang-format" --version + + +clanFormatBinariesPatched_storePath="$(nix add-to-store -n "clanFormatBinariesPatched" "$tmpDir")" +echo "clanFormatBinariesPatched_storePath='$clanFormatBinariesPatched_storePath'" + +rm_tmpdir + +echo +echo "------------- Nix mono ---------------" +print_nix_version_clangtools + +echo +echo "------------- Nix mono ---------------" +print_nix_version_mono + diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix new file mode 100644 index 00000000000..3e5bf42dd95 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -0,0 +1,2213 @@ +{ config +, lib +, fetchurl +, callPackage +, vscode-utils +, asciidoctor +, nodePackages +, jdk +, llvmPackages_8 +, nixpkgs-fmt +, protobuf +, jq +, shellcheck +, moreutils +, racket-minimal +, clojure-lsp +, alejandra +}: + +let + inherit (vscode-utils) buildVscodeMarketplaceExtension; + + # + # Unless there is a good reason not to, we attempt to use the same name as the + # extension's unique identifier (the name the extension gets when installed + # from vscode under `~/.vscode`) and found on the marketplace extension page. + # So an extension's attribute name should be of the form: + # "${mktplcRef.publisher}.${mktplcRef.name}". + # + baseExtensions = self: lib.mapAttrs (_n: lib.recurseIntoAttrs) + { + _4ops.terraform = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "4ops"; + name = "terraform"; + version = "0.2.1"; + sha256 = "196026a89pizj8p0hqdgkyllj2spx2qwpynsaqjq17s8v15vk5dg"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; + + a5huynh.vscode-ron = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-ron"; + publisher = "a5huynh"; + version = "0.9.0"; + sha256 = "0d3p50mhqp550fmj662d3xklj14gvzvhszm2hlqvx4h28v222z97"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + alanz.vscode-hie-server = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-hie-server"; + publisher = "alanz"; + version = "0.0.27"; # see the note above + sha256 = "1mz0h5zd295i73hbji9ivla8hx02i4yhqcv6l4r23w3f07ql3i8h"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + alefragnani.project-manager = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "project-manager"; + publisher = "alefragnani"; + version = "12.1.0"; + sha256 = "sha256-fYBKmWn9pJh2V0fGdqVrXj9zIl8oTrZcBycDaMOXL/8="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + alexdima.copy-relative-path = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "copy-relative-path"; + publisher = "alexdima"; + version = "0.0.2"; + sha256 = "06g601n9d6wyyiz659w60phgm011gn9jj5fy0gf5wpi2bljk3vcn"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + alygin.vscode-tlaplus = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-tlaplus"; + publisher = "alygin"; + version = "1.5.4"; + sha256 = "0mf98244z6wzb0vj6qdm3idgr2sr5086x7ss2khaxlrziif395dx"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + angular.ng-template = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "ng-template"; + publisher = "Angular"; + version = "12.2.0"; + sha256 = "sha256-CChkWKiLi/OcOm268d45pNwiyrKhztqYsQvJV/9z+Ag="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/Angular.ng-template/changelog"; + description = "Editor services for Angular templates"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=Angular.ng-template"; + homepage = "https://github.com/angular/vscode-ng-language-service"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + antfu = { + icons-carbon = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "icons-carbon"; + publisher = "antfu"; + version = "0.2.2"; + sha256 = "0mfap16la09mn0jhvy8s3dainrmjz64vra7d0d4fbcpgg420kv3f"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + slidev = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "antfu"; + name = "slidev"; + version = "0.3.3"; + sha256 = "0pqiwcvn5c8kwqlmz4ribwwra69gbiqvz41ig4fh29hkyh078rfk"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + }; + + antyos.openscad = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "openscad"; + publisher = "Antyos"; + version = "1.1.1"; + sha256 = "1adcw9jj3npk3l6lnlfgji2l529c4s5xp9jl748r9naiy3w3dpjv"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/Antyos.openscad/changelog"; + description = "OpenSCAD highlighting, snippets, and more for VSCode"; + homepage = "https://github.com/Antyos/vscode-openscad"; + license = licenses.gpl3; + }; + }; + + apollographql.vscode-apollo = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-apollo"; + publisher = "apollographql"; + version = "1.19.9"; + sha256 = "sha256-iJpzNKcuQrfq4Z0LXuadt6OKXelBbDQg/vuc7NJ2I5o="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/apollographql.vscode-apollo/changelog"; + description = "Rich editor support for GraphQL client and server development that seamlessly integrates with the Apollo platform"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo"; + homepage = "https://github.com/apollographql/vscode-graphql"; + license = licenses.mit; + maintainers = with maintainers; [ datafoo ]; + }; + }; + + arcticicestudio.nord-visual-studio-code = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "nord-visual-studio-code"; + publisher = "arcticicestudio"; + version = "0.18.0"; + sha256 = "sha256-Uo6peR+2ZNX6nwJ0Yar32Pe0rfBZ+f6ef1cYhUvVUbE="; + }; + meta = with lib; { + description = "An arctic, north-bluish clean and elegant Visual Studio Code theme."; + downloadPage = + "https://marketplace.visualstudio.com/items?itemName=arcticicestudio.nord-visual-studio-code"; + homepage = "https://github.com/arcticicestudio/nord-visual-studio-code"; + license = licenses.mit; + maintainers = with maintainers; [ imgabe ]; + }; + }; + + Arjun.swagger-viewer = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "Arjun"; + name = "swagger-viewer"; + version = "3.1.2"; + sha256 = "1cjvc99x1q5w3i2vnbxrsl5a1dr9gb3s6s9lnwn6mq5db6iz1nlm"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + arrterian.nix-env-selector = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "nix-env-selector"; + publisher = "arrterian"; + version = "1.0.7"; + sha256 = "0e76885c9dbb6dca4eac8a75866ec372b948cc64a3a3845327d7c3ef6ba42a57"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + asciidoctor.asciidoctor-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "asciidoctor-vscode"; + publisher = "asciidoctor"; + version = "2.8.9"; + sha256 = "1xkxx5i3nhd0dzqhhdmx0li5jifsgfhv0p5h7xwsscz3gzgsdcyb"; + }; + + postPatch = '' + substituteInPlace dist/src/text-parser.js \ + --replace "get('asciidoctor_command', 'asciidoctor')" \ + "get('asciidoctor_command', '${asciidoctor}/bin/asciidoctor')" + substituteInPlace dist/src/commands/exportAsPDF.js \ + --replace "get('asciidoctorpdf_command', 'asciidoctor-pdf')" \ + "get('asciidoctorpdf_command', '${asciidoctor}/bin/asciidoctor-pdf')" + ''; + + meta = with lib; { + license = licenses.mit; + }; + }; + + asvetliakov.vscode-neovim = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-neovim"; + publisher = "asvetliakov"; + version = "0.0.83"; + sha256 = "1giybf12p0h0fm950w9bwvzdk77771zfkylrqs9h0lhbdzr92qbl"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-python.vscode-pylance = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-pylance"; + publisher = "MS-python"; + version = "2022.1.5"; + sha256 = "1b5ihrac9xsq35a39vlq7krr1ffqpdjxdlhv9s056hs033kayazl"; + }; + + buildInputs = [ nodePackages.pyright ]; + + meta = { + license = lib.licenses.unfree; + }; + }; + + b4dm4n.vscode-nixpkgs-fmt = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "nixpkgs-fmt"; + publisher = "B4dM4n"; + version = "0.0.1"; + sha256 = "sha256-vz2kU36B1xkLci2QwLpl/SBEhfSWltIDJ1r7SorHcr8="; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties."nixpkgs-fmt.path".default = "${nixpkgs-fmt}/bin/nixpkgs-fmt"' package.json | sponge package.json + ''; + meta = with lib; { + license = licenses.mit; + }; + }; + + baccata.scaladex-search = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "scaladex-search"; + publisher = "baccata"; + version = "0.2.0"; + sha256 = "0xbikwlrascmn9nzyl4fxb2ql1dczd00ragp30a3yv8bax173bnz"; + }; + meta = { + license = lib.licenses.asl20; + }; + }; + + bbenoist.nix = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "Nix"; + publisher = "bbenoist"; + version = "1.0.1"; + sha256 = "0zd0n9f5z1f0ckzfjr38xw2zzmcxg1gjrava7yahg5cvdcw6l35b"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + benfradet.vscode-unison = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-unison"; + publisher = "benfradet"; + version = "0.3.0"; + sha256 = "1x80s8l8djchg17553aiwaf4b49hf6awiayk49wyii0i26hlpjk1"; + }; + meta = with lib; { + license = licenses.asl20; + }; + }; + + betterthantomorrow.calva = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "calva"; + publisher = "betterthantomorrow"; + version = "2.0.205"; + sha256 = "sha256-umnG1uLB42fUNKjANaKcABjVmqbdOQakd/6TPsEpF9c"; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration[0].properties."calva.clojureLspPath".default = "${clojure-lsp}/bin/clojure-lsp"' package.json | sponge package.json + ''; + meta = with lib; { + license = licenses.mit; + }; + }; + + bodil.file-browser = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "file-browser"; + publisher = "bodil"; + version = "0.2.10"; + sha256 = "sha256-RW4vm0Hum9AeN4Rq7MSJOIHnALU0L1tBLKjaRLA2hL8="; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + bradlc.vscode-tailwindcss = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-tailwindcss"; + publisher = "bradlc"; + version = "0.6.13"; + sha256 = "098vrm28b7jpzk0c2d0cgxvdw4jsswzf18cx1m9jwsm1j40fp5f4"; + }; + meta = with lib; { + license = licenses.mpl20; + }; + }; + + brettm12345.nixfmt-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "nixfmt-vscode"; + publisher = "brettm12345"; + version = "0.0.1"; + sha256 = "07w35c69vk1l6vipnq3qfack36qcszqxn8j3v332bl0w6m02aa7k"; + }; + meta = with lib; { + license = licenses.mpl20; + }; + }; + + bungcip.better-toml = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "better-toml"; + publisher = "bungcip"; + version = "0.3.2"; + sha256 = "sha256-g+LfgjAnSuSj/nSmlPdB0t29kqTmegZB5B1cYzP8kCI="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/bungcip.better-toml/changelog"; + description = "Better TOML Language support"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=bungcip.better-toml"; + homepage = "https://github.com/bungcip/better-toml/blob/master/README.md"; + license = licenses.mit; + maintainers = with maintainers; [ datafoo ]; + }; + }; + + chenglou92.rescript-vscode = callPackage ./rescript { }; + + christian-kohler.path-intellisense = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "path-intellisense"; + publisher = "christian-kohler"; + version = "2.6.1"; + sha256 = "sha256-ol98g3pliBlyEQ+n7cR4O04J/0QB9U8+fvf+FC0j0Fc="; + }; + meta = with lib; { + description = "Visual Studio Code plugin that autocompletes filenames"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense"; + homepage = "https://github.com/ChristianKohler/PathIntellisense"; + license = licenses.mit; + maintainers = with maintainers; [ imgabe ]; + }; + }; + + cmschuetz12.wal = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "wal"; + publisher = "cmschuetz12"; + version = "0.1.0"; + sha256 = "0q089jnzqzhjfnv0vlb5kf747s3mgz64r7q3zscl66zb2pz5q4zd"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + codezombiech.gitignore = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "gitignore"; + publisher = "codezombiech"; + version = "0.7.0"; + sha256 = "0fm4sxx1cb679vn4v85dw8dfp5x0p74m9p2b56gqkvdap0f2q351"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + coenraads.bracket-pair-colorizer = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/CoenraadS.bracket-pair-colorizer/changelog"; + description = "A customizable extension for colorizing matching brackets"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer"; + homepage = "https://github.com/CoenraadS/BracketPair"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; + mktplcRef = { + name = "bracket-pair-colorizer"; + publisher = "CoenraadS"; + version = "1.0.61"; + sha256 = "0r3bfp8kvhf9zpbiil7acx7zain26grk133f0r0syxqgml12i652"; + }; + }; + + coenraads.bracket-pair-colorizer-2 = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "bracket-pair-colorizer-2"; + publisher = "CoenraadS"; + version = "0.2.2"; + sha256 = "0zcbs7h801agfs2cggk1cz8m8j0i2ypmgznkgw17lcx3zisll9ad"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + coolbear.systemd-unit-file = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "coolbear"; + name = "systemd-unit-file"; + version = "1.0.6"; + sha256 = "0sc0zsdnxi4wfdlmaqwb6k2qc21dgwx6ipvri36x7agk7m8m4736"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; + + cweijan.vscode-database-client2 = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-database-client2"; + publisher = "cweijan"; + version = "4.3.3"; + sha256 = "06bj23y5rbpz0lw45p1sxssalgn19iqfqbijw2ym22grm0i9hcby"; + }; + meta = { + description = "Database Client For Visual Studio Code"; + homepage = "https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2"; + license = lib.licenses.mit; + }; + }; + + dbaeumer.vscode-eslint = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-eslint"; + publisher = "dbaeumer"; + version = "2.2.2"; + sha256 = "sha256-llalyQXl+k/ugZq+Ti9mApHRqAGu6QyoMP51GtZnRJ4="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + davidanson.vscode-markdownlint = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-markdownlint"; + publisher = "DavidAnson"; + version = "0.46.0"; + sha256 = "sha256-2FvE+6fnZPtR0At4NjLKSMCbPu8T7o8xtpvYiEjh7ck="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint/changelog"; + description = "Markdown linting and style checking for Visual Studio Code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint"; + homepage = "https://github.com/DavidAnson/vscode-markdownlint"; + license = licenses.mit; + maintainers = with maintainers; [ datafoo ]; + }; + }; + + davidlday.languagetool-linter = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "languagetool-linter"; + publisher = "davidlday"; + version = "0.19.0"; + sha256 = "sha256-crq6CTXpzwHJL8FPIBneAGjDgUUNdpBt6rIaMCr1F1U="; + }; + meta = with lib; { + description = "LanguageTool integration for VS Code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=davidlday.languagetool-linter"; + homepage = "https://github.com/davidlday/vscode-languagetool-linter"; + license = licenses.asl20; + maintainers = with maintainers; [ ebbertd ]; + }; + }; + + denoland.vscode-deno = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-deno"; + publisher = "denoland"; + version = "3.9.1"; + sha256 = "sha256-OuGTjmJQFAWrYp7YnFpyo0NnnCcXYF8itYjGKMa3FCs="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/denoland.vscode-deno/changelog"; + description = "A language server client for Deno"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno"; + homepage = "https://github.com/denoland/vscode_deno"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + dhall.dhall-lang = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "dhall-lang"; + publisher = "dhall"; + version = "0.0.4"; + sha256 = "0sa04srhqmngmw71slnrapi2xay0arj42j4gkan8i11n7bfi1xpf"; + }; + meta = { license = lib.licenses.mit; }; + }; + + dhall.vscode-dhall-lsp-server = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-dhall-lsp-server"; + publisher = "dhall"; + version = "0.0.4"; + sha256 = "1zin7s827bpf9yvzpxpr5n6mv0b5rhh3civsqzmj52mdq365d2js"; + }; + meta = { license = lib.licenses.mit; }; + }; + + disneystreaming.smithy = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "disneystreaming"; + name = "smithy"; + version = "0.0.2"; + sha256 = "0rdh7b5s7ynsyfrq1r1170g65q9vvvfl3qbfvbh1b38ndvj2f0yq"; + }; + meta = { license = lib.licenses.asl20; }; + }; + + divyanshuagrawal.competitive-programming-helper = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "competitive-programming-helper"; + publisher = "DivyanshuAgrawal"; + version = "5.8.5"; + sha256 = "25v2tdAX7fVl2B5nvOIKN9vP1G5rA0G67CiDQn9n9Uc="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/DivyanshuAgrawal.competitive-programming-helper/changelog"; + description = "Makes judging, compiling, and downloading problems for competitve programming easy. Also supports auto-submit for a few sites."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=DivyanshuAgrawal.competitive-programming-helper"; + homepage = "https://github.com/agrawal-d/cph"; + license = licenses.gpl3; + maintainers = with maintainers; [ arcticlimer ]; + }; + }; + + donjayamanne.githistory = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/donjayamanne.githistory/changelog"; + description = "View git log, file history, compare branches or commits"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory"; + homepage = "https://github.com/DonJayamanne/gitHistoryVSCode/"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; + mktplcRef = { + name = "githistory"; + publisher = "donjayamanne"; + version = "0.6.14"; + sha256 = "11x116hzqnhgbryp2kqpki1z5mlnwxb0ly9r1513m5vgbisrsn0i"; + }; + }; + + dotjoshjohnson.xml = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "xml"; + publisher = "dotjoshjohnson"; + version = "2.5.1"; + sha256 = "1v4x6yhzny1f8f4jzm4g7vqmqg5bqchyx4n25mkgvw2xp6yls037"; + }; + meta = { + description = "XML Tools"; + homepage = "https://github.com/DotJoshJohnson/vscode-xml"; + license = lib.licenses.mit; + }; + }; + + dracula-theme.theme-dracula = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "theme-dracula"; + publisher = "dracula-theme"; + version = "2.22.3"; + sha256 = "0wni9sriin54ci8rly2s68lkfx8rj1cys6mgcizvps9sam6377w6"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/dracula-theme.theme-dracula/changelog"; + description = "Dark theme for many editors, shells, and more"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=dracula-theme.theme-dracula"; + homepage = "https://draculatheme.com/"; + license = licenses.mit; + }; + }; + + eamodio.gitlens = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "gitlens"; + publisher = "eamodio"; + version = "11.7.0"; + sha256 = "0apjjlfdwljqih394ggz2d8m599pyyjrb0b4cfcz83601b7hk3x6"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/eamodio.gitlens/changelog"; + description = "GitLens supercharges the Git capabilities built into Visual Studio Code."; + longDescription = '' + Supercharge the Git capabilities built into Visual Studio Code — Visualize code authorship at a glance via Git + blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via + powerful comparison commands, and so much more + ''; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"; + homepage = "https://gitlens.amod.io/"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + editorconfig.editorconfig = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "EditorConfig"; + publisher = "EditorConfig"; + version = "0.16.4"; + sha256 = "0fa4h9hk1xq6j3zfxvf483sbb4bd17fjl5cdm3rll7z9kaigdqwg"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/EditorConfig.EditorConfig/changelog"; + description = "EditorConfig Support for Visual Studio Code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig"; + homepage = "https://github.com/editorconfig/editorconfig-vscode"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + }; + }; + + edonet.vscode-command-runner = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-command-runner"; + publisher = "edonet"; + version = "0.0.122"; + sha256 = "1lvwvcs18azqhkzyvhf83ckfhfdgcqrw2gxb2myspqj59783hfpg"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + eg2.vscode-npm-script = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-npm-script"; + publisher = "eg2"; + version = "0.3.24"; + sha256 = "sha256-XgdMLecyZQXsgQAUh8V4eFLKaUF4WVlgy9iIGNDnR/I="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + elmtooling.elm-ls-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "elm-ls-vscode"; + publisher = "Elmtooling"; + version = "2.4.0"; + sha256 = "sha256-5hYlkx8hlwS8iWTlfupX8XjTLAY/KUi0bd3jf/tm92o="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/Elmtooling.elm-ls-vscode/changelog"; + description = "Elm language server"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=Elmtooling.elm-ls-vscode"; + homepage = "https://github.com/elm-tooling/elm-language-client-vscode"; + license = licenses.mit; + maintainers = with maintainers; [ mcwitt ]; + }; + }; + + emmanuelbeziat.vscode-great-icons = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-great-icons"; + publisher = "emmanuelbeziat"; + version = "2.1.79"; + sha256 = "1cr1pxgxlfr643sfxbcr2xd53s1dnzcpacjj0ffkgizfda2psy78"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + esbenp.prettier-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "prettier-vscode"; + publisher = "esbenp"; + version = "9.2.0"; + sha256 = "sha256-ROI312MPMUY1q6IV4qVCW8DD0MQPA/hVW7rfamo/IbI="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/esbenp.prettier-vscode/changelog"; + description = "Code formatter using prettier"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"; + homepage = "https://github.com/prettier/prettier-vscode"; + license = licenses.mit; + maintainers = with maintainers; [ datafoo ]; + }; + }; + + ethansk.restore-terminals = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "restore-terminals"; + publisher = "ethansk"; + version = "1.1.6"; + sha256 = "sha256-XCgxphXIJ/y85IR/qEQhGsbnqWFRWvbyIDchnVTUqMg="; + }; + }; + + eugleo.magic-racket = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "magic-racket"; + publisher = "evzen-wybitul"; + version = "0.5.7"; + sha256 = "sha256-34/H0WgM73yzuOGU2w6Ipq7KuEBuN1bykcLGuvzY3mU="; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties."magic-racket.general.racketPath".default = "${racket-minimal}/bin/racket"' package.json | sponge package.json + ''; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/evzen-wybitul.magic-racket/changelog"; + description = "The best coding experience for Racket in VS Code "; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=evzen-wybitul.magic-racket"; + homepage = "https://github.com/Eugleo/magic-racket"; + license = licenses.agpl3Only; + }; + }; + + faustinoaq.lex-flex-yacc-bison = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "lex-flex-yacc-bison"; + publisher = "faustinoaq"; + version = "0.0.3"; + sha256 = "6254f52157dc796eae7bf135ac88c1c9cc19d884625331a1e634f9768722cc3d"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/faustinoaq.lex-flex-yacc-bison/changelog"; + description = "Language support for Lex, Flex, Yacc and Bison."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=faustinoaq.lex-flex-yacc-bison"; + homepage = "https://github.com/faustinoaq/vscode-lex-flex-yacc-bison"; + license = licenses.mit; + maintainers = with maintainers; [ emilytrau ]; + }; + }; + + file-icons.file-icons = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/file-icons.file-icons/changelog"; + description = "File-specific icons in VSCode for improved visual grepping."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=file-icons.file-icons"; + homepage = "https://github.com/file-icons/vscode"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; + mktplcRef = { + name = "file-icons"; + publisher = "file-icons"; + version = "1.0.28"; + sha256 = "1lyx0l42xhi2f3rdnjddc3mw7m913kjnchawi98i6vqsx3dv7091"; + }; + }; + + foam.foam-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "foam-vscode"; + publisher = "foam"; + version = "0.14.1"; + sha256 = "sha256-w9xGkezS3A9z6sTk8WWgW7g8qYX6mJFfRV0lv5cu160="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/foam.foam-vscode/changelog"; + description = "A personal knowledge management and sharing system for VSCode "; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=foam.foam-vscode"; + homepage = "https://foambubble.github.io/"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + formulahendry.auto-close-tag = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "auto-close-tag"; + publisher = "formulahendry"; + version = "0.5.13"; + sha256 = "0swyxhcibv6cl54gmfpnbz6bqidjzc77nx369wndhlq264idnwkw"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + formulahendry.auto-rename-tag = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "auto-rename-tag"; + publisher = "formulahendry"; + version = "0.1.9"; + sha256 = "1xk8rzda16qgdxhq8bz6f8w09fd9044qczx1wfhszd6w3r4q9262"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + formulahendry.code-runner = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "code-runner"; + publisher = "formulahendry"; + version = "0.11.2"; + sha256 = "0qwcxr6m1xwhqmdl4pccjgpikpq1hgi2hgrva5abn8ixa2510hcy"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + foxundermoon.shell-format = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "shell-format"; + publisher = "foxundermoon"; + version = "7.1.0"; + sha256 = "09z72mdr5bfdcb67xyzlv7lb9vyjlc3k9ackj4jgixfk40c68cnj"; + }; + meta = with lib; { + downloadPage = "https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format"; + homepage = "https://github.com/foxundermoon/vs-shell-format"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + }; + }; + + freebroccolo.reasonml = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/freebroccolo.reasonml/changelog"; + description = "Reason support for Visual Studio Code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=freebroccolo.reasonml"; + homepage = "https://github.com/reasonml-editor/vscode-reasonml"; + license = licenses.asl20; + maintainers = with maintainers; [ ]; + }; + mktplcRef = { + name = "reasonml"; + publisher = "freebroccolo"; + version = "1.0.38"; + sha256 = "1nay6qs9vcxd85ra4bv93gg3aqg3r2wmcnqmcsy9n8pg1ds1vngd"; + }; + }; + + humao.rest-client = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "humao"; + name = "rest-client"; + version = "0.24.6"; + sha256 = "196pm7gv0488bpv1lklh8hpwmdqc4yimz389gad6nsna368m4m43"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + jkillian.custom-local-formatters = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "jkillian"; + name = "custom-local-formatters"; + version = "0.0.4"; + sha256 = "1pmqnc759fq86g2z3scx5xqpni9khcqi5z2kpl1kb7yygsv314gm"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; + + kamikillerto.vscode-colorize = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-colorize"; + publisher = "kamikillerto"; + version = "0.11.1"; + sha256 = "1h82b1jz86k2qznprng5066afinkrd7j3738a56idqr3vvvqnbsm"; + }; + meta = { + license = lib.licenses.asl20; + }; + }; + + github = { + copilot = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "github"; + name = "copilot"; + version = "1.7.4812"; + sha256 = "1yl7m90m38pv8nz4dwcszjsa1sf253459xln17mngmc8z9wd3d3a"; + }; + meta = { license = lib.licenses.unfree; }; + }; + + github-vscode-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "github-vscode-theme"; + publisher = "github"; + version = "4.1.1"; + sha256 = "14wz2b0bn1rnmpj28c0mivz2gacla2dgg8ncv7qfx9bsxhf95g68"; + }; + meta = with lib; { + description = "GitHub theme for VS Code"; + downloadPage = + "https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme"; + homepage = "https://github.com/primer/github-vscode-theme"; + license = licenses.mit; + maintainers = with maintainers; [ hugolgst ]; + }; + }; + + vscode-pull-request-github = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-pull-request-github"; + publisher = "github"; + version = "0.35.2022010609"; + sha256 = "06ryx8b605fd1q2zz8jps7j8r506qwym93x1ra1kc0h9g8a8r7sa"; + }; + meta = { license = lib.licenses.mit; }; + }; + }; + + golang.go = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "Go"; + publisher = "golang"; + version = "0.25.1"; + sha256 = "sha256-ZDUWN9lzDnR77W7xcMFQaaFl/6Lf/x1jgaBkwZPqGGw="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + graphql.vscode-graphql = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-graphql"; + publisher = "GraphQL"; + version = "0.3.50"; + sha256 = "1yf6v2vsgmq86ysb6vxzbg2gh6vz03fsz0d0rhpvpghayrjlk5az"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + gruntfuggly.todo-tree = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "todo-tree"; + publisher = "Gruntfuggly"; + version = "0.0.215"; + sha256 = "sha256-WK9J6TvmMCLoqeKWh5FVp1mNAXPWVmRvi/iFuLWMylM="; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + haskell.haskell = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "haskell"; + publisher = "haskell"; + version = "1.8.0"; + sha256 = "sha256-+k8XT2COe9Z8HvZvcrzfVuocRcxXBrVoNHDT/uKK7Hs="; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + hashicorp.terraform = callPackage ./terraform { }; + + hookyqr.beautify = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "beautify"; + publisher = "HookyQR"; + version = "1.5.0"; + sha256 = "1c0kfavdwgwham92xrh0gnyxkrl9qlkpv39l1yhrldn8vd10fj5i"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + ibm.output-colorizer = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "output-colorizer"; + publisher = "IBM"; + version = "0.1.2"; + sha256 = "0i9kpnlk3naycc7k8gmcxas3s06d67wxr3nnyv5hxmsnsx5sfvb7"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + iciclesoft.workspacesort = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "workspacesort"; + publisher = "iciclesoft"; + version = "1.6.0"; + sha256 = "1pbk8kflywll6lqhmffz9yjf01dn8xq8sk6rglnfn2kl2ildfhh6"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/iciclesoft.workspacesort/changelog"; + description = "Sort workspace-folders alphabetically rather than in chronological order"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=iciclesoft.workspacesort"; + homepage = "https://github.com/iciclesoft/workspacesort-for-VSCode"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + }; + }; + + ionide.ionide-fsharp = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "Ionide-fsharp"; + publisher = "Ionide"; + version = "5.10.1"; + sha256 = "sha256-LkWWgyh4khPyUgekVeO8ZzPK+1gTrS8d9Yz6/kHomr8="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/Ionide.Ionide-fsharp/changelog"; + description = "Enhanced F# Language Features for Visual Studio Code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp"; + homepage = "https://ionide.io"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + elixir-lsp.vscode-elixir-ls = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "elixir-ls"; + publisher = "JakeBecker"; + version = "0.8.0"; + sha256 = "sha256-VD1g4DJfA0vDJ0cyHFDEtCEqQo0nXfPC5vknEU91cPk="; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + influxdata.flux = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "influxdata"; + name = "flux"; + version = "0.6.13"; + sha256 = "0myl7rppzcz7hxy9zjs81vs9p66lnbfcrdr6s5qb4i6929gmywfy"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + jakebecker.elixir-ls = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "elixir-ls"; + publisher = "JakeBecker"; + version = "0.9.0"; + sha256 = "sha256-KNfZOrVxK3/rClHPcIyPgE9CRtjkI7NLY0xZ9W+X6OM="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/JakeBecker.elixir-ls/changelog"; + description = "Elixir support with debugger, autocomplete, and more. Powered by ElixirLS."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls"; + homepage = "https://github.com/elixir-lsp/elixir-ls"; + license = licenses.mit; + maintainers = with maintainers; [ datafoo ]; + }; + }; + + james-yu.latex-workshop = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "latex-workshop"; + publisher = "James-Yu"; + version = "8.2.0"; + sha256 = "1ai16aam4v5jzhxgms589q0l24kyk1a9in6z4i7g05b3sahyxab2"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + jdinhlife.gruvbox = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "gruvbox"; + publisher = "jdinhlife"; + version = "1.5.1"; + sha256 = "sha256-0ghB0E+Wa9W2bNFFiH2Q3pUJ9HV5+JfKohX4cRyevC8="; + }; + meta = with lib; { + description = "Gruvbox Theme"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=jdinhlife.gruvbox"; + homepage = "https://github.com/jdinhify/vscode-theme-gruvbox"; + license = licenses.mit; + maintainers = with maintainers; [ imgabe ]; + }; + }; + + jnoortheen.nix-ide = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "nix-ide"; + publisher = "jnoortheen"; + version = "0.1.19"; + sha256 = "1ms96ij6z4bysdhqgdaxx2znvczyhzx57iifbqws50m1c3m7pkx7"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/jnoortheen.nix-ide/changelog"; + description = "Nix language support with formatting and error report"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=jnoortheen.nix-ide"; + homepage = "https://github.com/jnoortheen/vscode-nix-ide"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; + }; + + jock.svg = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "svg"; + publisher = "jock"; + version = "1.4.15"; + sha256 = "0a5w6qxvsdzcmgc0yfiagpmz25y90pmzgrxz9899na5qy3pjcbmz"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + johnpapa.vscode-peacock = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-peacock"; + publisher = "johnpapa"; + version = "4.0.0"; + sha256 = "1i65w70f0kikah1cx7m0bji6qd800jabfci0xisdqxyzaksg7ysz"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + jpoissonnier.vscode-styled-components = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-styled-components"; + publisher = "jpoissonnier"; + version = "1.4.1"; + sha256 = "sha256-ojbeuYBCS+DjF5R0aLuBImzoSOb8mXw1s0Uh0CzggzE="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + justusadam.language-haskell = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "language-haskell"; + publisher = "justusadam"; + version = "3.4.0"; + sha256 = "0ab7m5jzxakjxaiwmg0jcck53vnn183589bbxh3iiylkpicrv67y"; + }; + meta = { + license = lib.licenses.bsd3; + }; + }; + + kahole.magit = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "magit"; + publisher = "kahole"; + version = "0.6.18"; + sha256 = "0sqzz5bbqqg60aypvwxcqnxrr72gmwfj9sv0amgkyaf60zg5sf7w"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + kamadorueda.alejandra = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "alejandra"; + publisher = "kamadorueda"; + version = "1.0.0"; + sha256 = "sha256-COlEjKhm8tK5XfOjrpVUDQ7x3JaOLiYoZ4MdwTL8ktk="; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + + jq -e ' + .contributes.configuration.properties."alejandra.program".default = + "${alejandra}/bin/alejandra" | + .contributes.configurationDefaults."alejandra.program" = + "${alejandra}/bin/alejandra" + ' \ + < package.json \ + | sponge package.json + ''; + meta = with lib; { + description = "The Uncompromising Nix Code Formatter"; + homepage = "https://github.com/kamadorueda/alejandra"; + license = licenses.unlicense; + maintainers = with maintainers; [ kamadorueda ]; + }; + }; + + kubukoz.nickel-syntax = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "nickel-syntax"; + publisher = "kubukoz"; + version = "0.0.1"; + sha256 = "010zn58j9kdb2jpxmlfyyyais51pwn7v2c5cfi4051ayd02b9n3s"; + }; + meta = { + license = lib.licenses.asl20; + }; + }; + + llvm-vs-code-extensions.vscode-clangd = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-clangd"; + publisher = "llvm-vs-code-extensions"; + version = "0.1.13"; + sha256 = "/MpwbM+obcD3uqk8hnDrnbEK9Jot4fMe4sNzLt6mVGI="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + lokalise.i18n-ally = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "i18n-ally"; + publisher = "Lokalise"; + version = "2.7.1"; + sha256 = "sha256-nHBYRSiPQ5ucWPr9VCUgMrosloLnVj40Fh+CEBvWONE="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mads-hartmann.bash-ide-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "mads-hartmann"; + name = "bash-ide-vscode"; + version = "1.11.0"; + sha256 = "1hq41fy2v1grjrw77mbs9k6ps6gncwlydm03ipawjnsinxc9rdkp"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; + + mhutchie.git-graph = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "git-graph"; + publisher = "mhutchie"; + version = "1.30.0"; + sha256 = "sha256-sHeaMMr5hmQ0kAFZxxMiRk6f0mfjkg2XMnA4Gf+DHwA="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mikestead.dotenv = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "dotenv"; + publisher = "mikestead"; + version = "1.0.1"; + sha256 = "sha256-dieCzNOIcZiTGu4Mv5zYlG7jLhaEsJR05qbzzzQ7RWc="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mishkinf.goto-next-previous-member = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "goto-next-previous-member"; + publisher = "mishkinf"; + version = "0.0.6"; + sha256 = "07rpnbkb51835gflf4fpr0v7fhj8hgbhsgcz2wpag8wdzdxc3025"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mskelton.one-dark-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "one-dark-theme"; + publisher = "mskelton"; + version = "1.7.2"; + sha256 = "1ks6z8wsxmlfhiwa51f7d6digvw11dlxc7mja3hankgxcf5dyj31"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mechatroner.rainbow-csv = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "rainbow-csv"; + publisher = "mechatroner"; + version = "2.0.0"; + sha256 = "0wjlp6lah9jb0646sbi6x305idfgydb6a51pgw4wdnni02gipbrs"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-azuretools.vscode-docker = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-docker"; + publisher = "ms-azuretools"; + version = "1.19.0"; + sha256 = "sha256-buIAbsyKUvX3blO1AbCq/tJ1KAcqaFpciqQovmOZ5GE="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-ceintl = callPackage ./language-packs.nix {}; # non-English language packs + + ms-dotnettools.csharp = callPackage ./ms-dotnettools-csharp { }; + + ms-kubernetes-tools.vscode-kubernetes-tools = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-kubernetes-tools"; + publisher = "ms-kubernetes-tools"; + version = "1.3.4"; + sha256 = "0ial5ljgm0m35wh5gy4kpr0v7053wi52cv57ad4vcbxc9z00hxrd"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-vscode.cpptools = callPackage ./cpptools { }; + + ms-vscode-remote.remote-ssh = callPackage ./remote-ssh { }; + + ms-vscode.theme-tomorrowkit = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "Theme-TomorrowKit"; + publisher = "ms-vscode"; + version = "0.1.4"; + sha256 = "sha256-qakwJWak+IrIeeVcMDWV/fLPx5M8LQGCyhVt4TS/Lmc="; + }; + meta = with lib; { + description = "Additional Tomorrow and Tomorrow Night themes for VS Code. Based on the TextMate themes."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-vscode.Theme-TomorrowKit"; + homepage = "https://github.com/microsoft/vscode-themes"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + ms-pyright.pyright = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "pyright"; + publisher = "ms-pyright"; + version = "1.1.222"; + sha256 = "sha256-QMX/SawDEnG1xVrug8mvN7EvRrRDkJffcXBUFpQi1XE="; + }; + meta = with lib; { + description = "VS Code static type checking for Python"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-pyright.pyright"; + homepage = "https://github.com/Microsoft/pyright#readme"; + changelog = "https://marketplace.visualstudio.com/items/ms-pyright.pyright/changelog"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + ms-python.python = callPackage ./python { + extractNuGet = callPackage ./python/extract-nuget.nix { }; + }; + + msjsdiag.debugger-for-chrome = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "debugger-for-chrome"; + publisher = "msjsdiag"; + version = "4.12.11"; + sha256 = "sha256-9i3TgCFThnFF5ccwzS4ATj5c2Xoe/4tDFGv75jJxeQ4="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-toolsai.jupyter = callPackage ./ms-toolsai-jupyter {}; + + ms-toolsai.jupyter-renderers = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "jupyter-renderers"; + publisher = "ms-toolsai"; + version = "1.0.4"; + sha256 = "sha256-aKWu0Gp0f28DCv2akF/G8UDaGfTN410CcH8CAmW7mgU="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-vscode.anycode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "anycode"; + publisher = "ms-vscode"; + version = "0.0.57"; + sha256 = "sha256-XwL7I+vwZJ6zx5IDZdfOUbq6M9IH/gi7MBe92cG1kDs="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mvllow.rose-pine = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "mvllow"; + name = "rose-pine"; + version = "1.3.6"; + sha256 = "sha256-pKrwiA/ZArBfumT0VTauhINSDEbABWgBBzTZEE07wzk="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + naumovs.color-highlight = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "color-highlight"; + publisher = "naumovs"; + version = "2.5.0"; + sha256 = "sha256-dYMDV84LEGXUjt/fbsSy3BVM5SsBHcPaDDll8KjPIWY="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/naumovs.color-highlight/changelog"; + description = "Highlight web colors in your editor"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=naumovs.color-highlight"; + homepage = "https://github.com/enyancc/vscode-ext-color-highlight"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ datafoo ]; + }; + }; + + octref.vetur = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vetur"; + publisher = "octref"; + version = "0.34.1"; + sha256 = "09w3bik1mxs7qac67wgrc58vl98ham3syrn2anycpwd7135wlpby"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + oderwat.indent-rainbow = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "indent-rainbow"; + publisher = "oderwat"; + version = "8.2.2"; + sha256 = "sha256-7kkJc+hhYaSKUbK4eYwOnLvae80sIg7rd0E4YyCXtPc="; + }; + meta = with lib; { + description = "Makes indentation easier to read"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow"; + homepage = "https://github.com/oderwat/vscode-indent-rainbow"; + license = licenses.mit; + maintainers = with maintainers; [ imgabe ]; + }; + }; + + redhat.java = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "java"; + publisher = "redhat"; + version = "1.2.0"; + sha256 = "sha256-YmR3FWhPZSU2gE6NIVoA1HZBzaYaTNYFXC/uNwbDEdQ="; + }; + buildInputs = [ jdk ]; + meta = { + license = lib.licenses.epl20; + broken = lib.versionOlder jdk.version "11"; + }; + }; + + redhat.vscode-yaml = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-yaml"; + publisher = "redhat"; + version = "1.3.0"; + sha256 = "sha256-Tz6bLcBUATn8cYIzGoLJwgaJZGbBVr1CISmJHz+iM60="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + rioj7.commandOnAllFiles = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "commandOnAllFiles"; + publisher = "rioj7"; + version = "0.3.0"; + sha256 = "sha256-tNFHrgFJ22YGQgkYw+0l4G6OtlUYVn9brJPLnsvSwRE="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + rubymaniac.vscode-paste-and-indent = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-paste-and-indent"; + publisher = "Rubymaniac"; + version = "0.0.8"; + sha256 = "0fqwcvwq37ndms6vky8jjv0zliy6fpfkh8d9raq8hkinfxq6klgl"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + matklad.rust-analyzer = callPackage ./rust-analyzer { }; + + ocamllabs.ocaml-platform = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/ocamllabs.ocaml-platform/changelog"; + description = "Official OCaml Support from OCamlLabs"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform"; + homepage = "https://github.com/ocamllabs/vscode-ocaml-platform"; + license = licenses.isc; + maintainers = with maintainers; [ ratsclub ]; + }; + mktplcRef = { + name = "ocaml-platform"; + publisher = "ocamllabs"; + version = "1.8.4"; + sha256 = "sha256-T1eYAuYMv4B7rdECxYzNfIpydjzCDjeo7gmb1uhr6VM="; + }; + }; + + pkief.material-icon-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "material-icon-theme"; + publisher = "PKief"; + version = "4.12.1"; + sha256 = "sha256-pmWnnZrdk6zb8YFG5ESgK4k875hgeseWyzkA9YUjg7A="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + pkief.material-product-icons = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "material-product-icons"; + publisher = "PKief"; + version = "1.1.1"; + sha256 = "a0bd0eff67793828768135fd839f28db0949da9a310db312beb0781f2164fd47"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ritwickdey.liveserver = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "liveserver"; + publisher = "ritwickdey"; + version = "5.6.1"; + sha256 = "sha256-QPMZMttYV+dQfWTniA7nko7kXukqU9g6Wj5YDYfL6hw="; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + roman.ayu-next = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "ayu-next"; + publisher = "roman"; + version = "1.2.9"; + sha256 = "sha256-rwZnqvHRmMquNq9PnU176vI4g8PtS6wSNvQaZ1BMa4I="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + rubbersheep.gi = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "gi"; + publisher = "rubbersheep"; + version = "0.2.11"; + sha256 = "0j9k6wm959sziky7fh55awspzidxrrxsdbpz1d79s5lr5r19rs6j"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ryu1kn.partial-diff = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "partial-diff"; + publisher = "ryu1kn"; + version = "1.4.3"; + sha256 = "0x3lkvna4dagr7s99yykji3x517cxk5kp7ydmqa6jb4bzzsv1s6h"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + scala-lang.scala = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "scala"; + publisher = "scala-lang"; + version = "0.5.5"; + sha256 = "1gqgamm97sq09za8iyb06jf7hpqa2mlkycbx6zpqwvlwd3a92qr1"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + scalameta.metals = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "metals"; + publisher = "scalameta"; + version = "1.12.18"; + sha256 = "104h3qfdn0y4138g3mdw1209qqh3mj3jsdsbzpnw2plk1cmr3nx5"; + }; + meta = { + license = lib.licenses.asl20; + }; + }; + + serayuzgur.crates = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "crates"; + publisher = "serayuzgur"; + version = "0.5.10"; + sha256 = "1dbhd6xbawbnf9p090lpmn8i5gg1f7y8xk2whc9zhg4432kdv3vd"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + shardulm94.trailing-spaces = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "shardulm94"; + name = "trailing-spaces"; + version = "0.3.1"; + sha256 = "0h30zmg5rq7cv7kjdr5yzqkkc1bs20d72yz9rjqag32gwf46s8b8"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; + + shyykoserhiy.vscode-spotify = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-spotify"; + publisher = "shyykoserhiy"; + version = "3.2.1"; + sha256 = "14d68rcnjx4a20r0ps9g2aycv5myyhks5lpfz0syr2rxr4kd1vh6"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + silvenon.mdx = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "mdx"; + publisher = "silvenon"; + version = "0.1.0"; + sha256 = "1mzsqgv0zdlj886kh1yx1zr966yc8hqwmiqrb1532xbmgyy6adz3"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + skyapps.fish-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "fish-vscode"; + publisher = "skyapps"; + version = "0.2.1"; + sha256 = "0y1ivymn81ranmir25zk83kdjpjwcqpnc9r3jwfykjd9x0jib2hl"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + slevesque.vscode-multiclip = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-multiclip"; + publisher = "slevesque"; + version = "0.1.5"; + sha256 = "1cg8dqj7f10fj9i0g6mi3jbyk61rs6rvg9aq28575rr52yfjc9f9"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + spywhere.guides = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "guides"; + publisher = "spywhere"; + version = "0.9.3"; + sha256 = "1kvsj085w1xax6fg0kvsj1cizqh86i0pkzpwi0sbfvmcq21i6ghn"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + stephlin.vscode-tmux-keybinding = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-tmux-keybinding"; + publisher = "stephlin"; + version = "0.0.6"; + sha256 = "0mph2nval1ddmv9hpl51fdvmagzkqsn8ljwqsfha2130bb7la0d9"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/stephlin.vscode-tmux-keybinding/changelog"; + description = "A simple extension for tmux behavior in vscode terminal."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=stephlin.vscode-tmux-keybinding"; + homepage = "https://github.com/StephLin/vscode-tmux-keybinding"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + }; + }; + + stkb.rewrap = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "stkb"; + name = "rewrap"; + version = "1.16.1"; + sha256 = "sha256-OTPNbwoQmKd73g8IwLKMIbe6c7E2jKNkzwuBU/f8dmY="; + }; + meta = with lib; { + changelog = "https://github.com/stkb/Rewrap/blob/master/CHANGELOG.md"; + description = "Hard word wrapping for comments and other text at a given column."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=stkb.rewrap"; + homepage = "https://github.com/stkb/Rewrap#readme"; + license = licenses.asl20; + maintainers = with maintainers; [ datafoo ]; + }; + }; + + streetsidesoftware.code-spell-checker = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "code-spell-checker"; + publisher = "streetsidesoftware"; + version = "2.1.5"; + sha256 = "sha256-nIR3PtbtnSbAU0rS+qVtPsj++Dbfp/k86dWkx4xYcno="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/streetsidesoftware.code-spell-checker/changelog"; + description = "Spelling checker for source code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker"; + homepage = "https://streetsidesoftware.github.io/vscode-spell-checker"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ datafoo ]; + }; + }; + + svelte.svelte-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "svelte-vscode"; + publisher = "svelte"; + version = "105.3.0"; + sha256 = "11plqsj3c4dv0xg2d76pxrcn382qr9wbh1lhln2x8mzv840icvwr"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + svsool.markdown-memo = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "markdown-memo"; + publisher = "svsool"; + version = "0.3.18"; + sha256 = "sha256-ypYqVH1ViJE7+mAJnxmpvUSmiImOo7rE7m+ijTEpmwg="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/svsool.markdown-memo/changelog"; + description = "Markdown knowledge base with bidirectional [[link]]s built on top of VSCode"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=svsool.markdown-memo"; + homepage = "https://github.com/svsool/vscode-memo"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + tabnine.tabnine-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "tabnine-vscode"; + publisher = "tabnine"; + version = "3.4.27"; + sha256 = "sha256-Xg/N59a38OKEWb/4anysslensUoj9ENcuobkyByFDxE="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + takayama.vscode-qq = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "takayama"; + name = "vscode-qq"; + version = "1.4.0"; + sha256 = "sha256-DYjNWSKOrDYvdiV7G24uKz6w4ggeYUMkQIiOGZAbMSI="; + }; + meta = { + license = lib.licenses.mpl20; + }; + }; + + tamasfe.even-better-toml = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "even-better-toml"; + publisher = "tamasfe"; + version = "0.14.2"; + sha256 = "17djwa2bnjfga21nvyz8wwmgnjllr4a7nvrsqvzm02hzlpwaskcl"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + tiehuis.zig = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "zig"; + publisher = "tiehuis"; + version = "0.2.5"; + sha256 = "sha256-P8Sep0OtdchTfnudxFNvIK+SW++TyibGVI9zd+B5tu4="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + + timonwong.shellcheck = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "shellcheck"; + publisher = "timonwong"; + version = "0.18.4"; + sha256 = "00cii58md6v028h0xfvbdjvg3r44451mi0lfmjwiwif5xcw3wnlx"; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties."shellcheck.executablePath".default = "${shellcheck}/bin/shellcheck"' package.json | sponge package.json + ''; + meta = { + license = lib.licenses.mit; + }; + }; + + tobiasalthoff.atom-material-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "atom-material-theme"; + publisher = "tobiasalthoff"; + version = "1.10.7"; + sha256 = "sha256-t5CKrDEbDCuo28wN+hiWrvkt3C9vQAPfV/nd3QBGQ/s="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + tomoki1207.pdf = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "pdf"; + publisher = "tomoki1207"; + version = "1.2.0"; + sha256 = "1bcj546bp0w4yndd0qxwr8grhiwjd1jvf33jgmpm0j96y34vcszz"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + tuttieee.emacs-mcx = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "emacs-mcx"; + publisher = "tuttieee"; + version = "0.37.1"; + sha256 = "19969qb6ink70km4wawh4w238igdm6npwskyr3hx38qgf69nd748"; + }; + meta = { + changelog = "https://github.com/whitphx/vscode-emacs-mcx/blob/main/CHANGELOG.md"; + description = "Awesome Emacs Keymap - VSCode emacs keybinding with multi cursor support"; + homepage = "https://github.com/whitphx/vscode-emacs-mcx"; + license = lib.licenses.mit; + }; + }; + + tyriar.sort-lines = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "sort-lines"; + publisher = "Tyriar"; + version = "1.9.1"; + sha256 = "0dds99j6awdxb0ipm15g543a5b6f0hr00q9rz961n0zkyawgdlcb"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + usernamehw.errorlens = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "errorlens"; + publisher = "usernamehw"; + version = "3.4.1"; + sha256 = "1mr8si7jglpjw8qzl4af1k7r68vz03fpal1dr8i0iy4ly26pz7bh"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/usernamehw.errorlens/changelog"; + description = "Improve highlighting of errors, warnings and other language diagnostics."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens"; + homepage = "https://github.com/usernamehw/vscode-error-lens"; + license = licenses.mit; + maintainers = with maintainers; [ imgabe ]; + }; + }; + + vadimcn.vscode-lldb = callPackage ./vscode-lldb { }; + + valentjn.vscode-ltex = vscode-utils.buildVscodeMarketplaceExtension rec { + mktplcRef = { + name = "vscode-ltex"; + publisher = "valentjn"; + version = "13.1.0"; + }; + + vsix = fetchurl { + name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; + url = "https://github.com/valentjn/vscode-ltex/releases/download/${mktplcRef.version}/vscode-ltex-${mktplcRef.version}-offline-linux-x64.vsix"; + sha256 = "1nlrijjwc35n1xgb5lgnr4yvlgfcxd0vdj93ip8lv2xi8x1ni5f6"; + }; + + nativeBuildInputs = [ jq moreutils ]; + + buildInputs = [ jdk ]; + + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties."ltex.java.path".default = "${jdk}"' package.json | sponge package.json + ''; + + meta = with lib; { + license = licenses.mpl20; + maintainers = [ maintainers._0xbe7a ]; + }; + }; + + viktorqvarfordt.vscode-pitch-black-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-pitch-black-theme"; + publisher = "ViktorQvarfordt"; + version = "1.2.4"; + sha256 = "sha256-HTXToZv0WWFjuQiofEJuaZNSDTmCUcZ0B3KOn+CVALw="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + + vincaslt.highlight-matching-tag = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "highlight-matching-tag"; + publisher = "vincaslt"; + version = "0.10.1"; + sha256 = "0b9jpwiyxax783gyr9zhx7sgrdl9wffq34fi7y67vd68q9183jw1"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-vsliveshare.vsliveshare = callPackage ./ms-vsliveshare-vsliveshare { }; + + vscodevim.vim = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vim"; + publisher = "vscodevim"; + version = "1.21.5"; + sha256 = "1v1xs1wcigisr6xip31i02cfryxrb157sla34y59pwlnhc5x1gny"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + vspacecode.vspacecode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vspacecode"; + publisher = "VSpaceCode"; + version = "0.10.1"; + sha256 = "sha256-H7SCC/ZhDswMQjLX+qpQa6A1N83MobJRPC4pyIbZ1kA="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + vspacecode.whichkey = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "whichkey"; + publisher = "VSpaceCode"; + version = "0.9.2"; + sha256 = "sha256-f+t2d8iWW88OYzuYFxzQPnmFMgx/DELBywYhA8A/0EU="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + wix.vscode-import-cost = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-import-cost"; + publisher = "wix"; + version = "2.15.0"; + sha256 = "0d3b6654cdck1syn74vmmd1jmgkrw5v4c4cyrhdxbhggkip732bc"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + xadillax.viml = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "viml"; + publisher = "xadillax"; + version = "1.0.1"; + sha256 = "sha256-mzf2PBSbvmgPjchyKmTaf3nASUi5/S9Djpoeh0y8gH0="; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + xaver.clang-format = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "clang-format"; + publisher = "xaver"; + version = "1.9.0"; + sha256 = "abd0ef9176eff864f278c548c944032b8f4d8ec97d9ac6e7383d60c92e258c2f"; + }; + meta = with lib; { + license = licenses.mit; + maintainers = [ maintainers.zeratax ]; + }; + }; + + xyz.local-history = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "local-history"; + publisher = "xyz"; + version = "1.8.1"; + sha256 = "1mfmnbdv76nvwg4xs3rgsqbxk8hw9zr1b61har9c3pbk9r4cay7v"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + yzhang.markdown-all-in-one = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "markdown-all-in-one"; + publisher = "yzhang"; + version = "3.4.0"; + sha256 = "0ihfrsg2sc8d441a2lkc453zbw1jcpadmmkbkaf42x9b9cipd5qb"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + zhuangtongfa.material-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "material-theme"; + publisher = "zhuangtongfa"; + version = "3.13.17"; + sha256 = "100riqnvc2j315i1lvnwxmgga17s369xxvds5skgnk2yi2xnm2g9"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + llvm-org.lldb-vscode = llvmPackages_8.lldb; + + WakaTime.vscode-wakatime = callPackage ./wakatime { }; + + wholroyd.jinja = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "jinja"; + publisher = "wholroyd"; + version = "0.0.8"; + sha256 = "1ln9gly5bb7nvbziilnay4q448h9npdh7sd9xy277122h0qawkci"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + zxh404.vscode-proto3 = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-proto3"; + publisher = "zxh404"; + version = "0.5.4"; + sha256 = "08dfl5h1k6s542qw5qx2czm1wb37ck9w2vpjz44kp2az352nmksb"; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties.protoc.properties.path.default = "${protobuf}/bin/protoc"' package.json | sponge package.json + ''; + meta = { + license = lib.licenses.mit; + }; + }; + }; + + aliases = self: super: { + # aliases + ms-vscode = lib.recursiveUpdate super.ms-vscode { inherit (super.golang) go; }; + }; + + # TODO: add overrides overlay, so that we can have a generated.nix + # then apply extension specific modifcations to packages. + + # overlays will be applied left to right, overrides should come after aliases. + overlays = lib.optionals (config.allowAliases or true) [ aliases ]; + + toFix = lib.foldl' (lib.flip lib.extends) baseExtensions overlays; +in +lib.fix toFix diff --git a/pkgs/applications/editors/vscode/extensions/language-packs.nix b/pkgs/applications/editors/vscode/extensions/language-packs.nix new file mode 100644 index 00000000000..f97727d6c2c --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/language-packs.nix @@ -0,0 +1,89 @@ +{ lib, vscode-utils }: + +with vscode-utils; + +let + + buildVscodeLanguagePack = { language, sha256 }: + buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-language-pack-${language}"; + publisher = "MS-CEINTL"; + version = "1.64.3"; + inherit sha256; + }; + meta = { + license = lib.licenses.mit; + }; + }; + +in + +# See list of core language packs at https://github.com/Microsoft/vscode-loc +{ + # French + vscode-language-pack-fr = buildVscodeLanguagePack { + language = "fr"; + sha256 = "sha256-6ynT1sbMgKO8iZReQ6KxFpR1VL3Nuo58MvXCtp+67vA="; + }; + # Italian + vscode-language-pack-it = buildVscodeLanguagePack { + language = "it"; + sha256 = "sha256-5aNFpzNMZAZJH3n0rJevke9P6AW0au5i8+r4PXsb9Rg="; + }; + # German + vscode-language-pack-de = buildVscodeLanguagePack { + language = "de"; + sha256 = "sha256-oEaWtsgktHKw52lnZTESkpzC/TTY8LO4yX11IgtMG5U="; + }; + # Spanish + vscode-language-pack-es = buildVscodeLanguagePack { + language = "es"; + sha256 = "sha256-utLWbved3WCCk3XzqedbYzmyaKfbMrAmR0btT09GlxA="; + }; + # Russian + vscode-language-pack-ru = buildVscodeLanguagePack { + language = "ru"; + sha256 = "sha256-0Wr2ICOiaaj4jZ555bxUJcmXO/yWDyn0UmdvxUF3WSQ="; + }; + # Chinese (Simplified) + vscode-language-pack-zh-hans = buildVscodeLanguagePack { + language = "zh-hans"; + sha256 = "sha256-irTSQcVXf/V3MuZwfx4tFcvBk+xhbFZTnb7IG28s/p4="; + }; + # Chinese (Traditional) + vscode-language-pack-zh-hant = buildVscodeLanguagePack { + language = "zh-hant"; + sha256 = "sha256-3IA/VTTTEqS6jrDYv50GnLXOTSC1XAMvqOVfOuvIdIs="; + }; + # Japanese + vscode-language-pack-ja = buildVscodeLanguagePack { + language = "ja"; + sha256 = "sha256-rxod70ddrppEYYzukksVY1dTXR8osLFAsIPr1fSFZDg="; + }; + # Korean + vscode-language-pack-ko = buildVscodeLanguagePack { + language = "ko"; + sha256 = "sha256-QYFaxJz1PqKKIiLosLQ8Tu3JNXzpxLFqgIHjjRLwjA4="; + }; + # Czech + vscode-language-pack-cs = buildVscodeLanguagePack { + language = "cs"; + sha256 = "sha256-eMk+syy2h+Xb3k6QB8PqYaF4I1ydaY6eRsvOXmelh9Q="; + }; + # Portuguese (Brazil) + vscode-language-pack-pt-br = buildVscodeLanguagePack { + language = "pt-BR"; + sha256 = "sha256-7Trz38KBl4sD7608MvTs02pUsdD05oHEj3Sp1LvtI7I="; + }; + # Turkish + vscode-language-pack-tr = buildVscodeLanguagePack { + language = "tr"; + sha256 = "sha256-T4CTpbve3vrNdW4VDfHDg8U8cQEtuxPV5LvNdtKrqzA"; + }; + # Pseudo Language + vscode-language-pack-qps-ploc = buildVscodeLanguagePack { + language = "qps-ploc"; + sha256 = "sha256-rPvCr3uQPfM8vwKoV7Un5aiMZClhf6TvG1PEe3xYNI0="; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/mktplcExtRefToFetchArgs.nix b/pkgs/applications/editors/vscode/extensions/mktplcExtRefToFetchArgs.nix new file mode 100644 index 00000000000..a781250fc18 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/mktplcExtRefToFetchArgs.nix @@ -0,0 +1,8 @@ +{ publisher, name, version, sha256 ? "" }: +{ + url = "https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"; + sha256 = sha256; + # The `*.vsix` file is in the end a simple zip file. Change the extension + # so that existing `unzip` hooks takes care of the unpacking. + name = "${publisher}-${name}.zip"; +} diff --git a/pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/default.nix b/pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/default.nix new file mode 100644 index 00000000000..d91cbccb808 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/default.nix @@ -0,0 +1,152 @@ +{ lib +, fetchurl +, vscode-utils +, unzip +, patchelf +, makeWrapper +, icu +, stdenv +, openssl +, mono +}: + +let + # Get as close as possible as the `package.json` required version. + # This is what drives omnisharp. + rtDepsSrcsFromJson = lib.importJSON ./rt-deps-bin-srcs.json; + + rtDepsBinSrcs = builtins.mapAttrs (k: v: + let + # E.g: "OmniSharp-x86_64-linux" + kSplit = builtins.split "(__)" k; + name = builtins.elemAt kSplit 0; + system = builtins.elemAt kSplit 2; + in + { + inherit name system; + installPath = v.installPath; + binaries = v.binaries; + bin-src = fetchurl { + urls = v.urls; + inherit (v) sha256; + }; + } + ) + rtDepsSrcsFromJson; + + rtDepBinSrcByName = bSrcName: + rtDepsBinSrcs."${bSrcName}__${stdenv.targetPlatform.system}"; + + omnisharp = rtDepBinSrcByName "OmniSharp"; + vsdbgs = [ + (rtDepBinSrcByName "Debugger") + ] ++ lib.optionals (stdenv.isDarwin) [ + # Include the aarch64-darwin debugger binaries on x86_64-darwin. Even though OmniSharp will be + # running under Rosetta 2, debugging will fail to start if both sets of binaries are not present. + (rtDepsBinSrcs."Debugger__aarch64-darwin") + ]; + razor = rtDepBinSrcByName "Razor"; +in + +vscode-utils.buildVscodeMarketplaceExtension { + mktplcRef = { + name = "csharp"; + publisher = "ms-dotnettools"; + version = "1.23.16"; + sha256 = "sha256-fM4vcSMi2tEjIox9Twh2sRiFhXgAeRwAM9to3vtcSqI="; + }; + + nativeBuildInputs = [ + unzip + patchelf + makeWrapper + ]; + + postPatch = '' + declare ext_unique_id + # See below as to why we cannot take the whole basename. + ext_unique_id="$(basename "$out" | head -c 32)" + + # Fix 'Unable to connect to debuggerEventsPipeName .. exceeds the maximum length 107.' when + # attempting to launch a specific test in debug mode. The extension attemps to open + # a pipe in extension dir which would fail anyway. We change to target file path + # to a path in tmp dir with a short name based on the unique part of the nix store path. + # This is however a brittle patch as we're working on minified code. + # Hence the attempt to only hold on stable names. + # However, this really would better be fixed upstream. + sed -i \ + -E -e 's/(this\._pipePath=[a-zA-Z0-9_]+\.join\()([a-zA-Z0-9_]+\.getExtensionPath\(\)[^,]*,)/\1require("os").tmpdir(), "'"$ext_unique_id"'"\+/g' \ + "$PWD/dist/extension.js" + + unzip_to() { + declare src_zip="''${1?}" + declare target_dir="''${2?}" + mkdir -p "$target_dir" + if unzip "$src_zip" -d "$target_dir"; then + true + elif [[ "1" -eq "$?" ]]; then + 1>&2 echo "WARNING: unzip('$?' -> skipped files)." + else + 1>&2 echo "ERROR: unzip('$?')." + fi + } + + patchelf_add_icu_as_needed() { + declare elf="''${1?}" + declare icu_major_v="${ + with builtins; head (splitVersion (parseDrvName icu.name).version)}" + + 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?}" + + patchelf_add_icu_as_needed "$elf" + patchelf --add-needed "libssl.so" "$elf" + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc openssl.out icu.out ]}:\$ORIGIN" \ + "$elf" + } + + declare omnisharp_dir="$PWD/${omnisharp.installPath}" + unzip_to "${omnisharp.bin-src}" "$omnisharp_dir" + rm "$omnisharp_dir/bin/mono" + ln -s -T "${mono}/bin/mono" "$omnisharp_dir/bin/mono" + chmod a+x "$omnisharp_dir/run" + touch "$omnisharp_dir/install.Lock" + + '' + builtins.concatStringsSep "\n" (map (vsdbg: '' + declare vsdbg_dir="$PWD/${vsdbg.installPath}" + unzip_to "${vsdbg.bin-src}" "$vsdbg_dir" + chmod a+x "$vsdbg_dir/vsdbg-ui" + chmod a+x "$vsdbg_dir/vsdbg" + touch "$vsdbg_dir/install.complete" + touch "$vsdbg_dir/install.Lock" + + '') vsdbgs) + '' + declare razor_dir="$PWD/${razor.installPath}" + unzip_to "${razor.bin-src}" "$razor_dir" + chmod a+x "$razor_dir/rzls" + touch "$razor_dir/install.Lock" + + '' + lib.optionalString stdenv.isLinux '' + patchelf_common "$vsdbg_dir/vsdbg" + patchelf_common "$vsdbg_dir/vsdbg-ui" + patchelf_common "$razor_dir/rzls" + + '' + lib.optionalString stdenv.isDarwin '' + substituteInPlace $omnisharp_dir/etc/config \ + --replace "libmono-native-compat.dylib" "libmono-native.dylib" + ''; + + meta = with lib; { + description = "C# for Visual Studio Code (powered by OmniSharp)"; + homepage = "https://github.com/OmniSharp/omnisharp-vscode"; + license = licenses.mit; + maintainers = [ maintainers.jraygauthier ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json b/pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json new file mode 100644 index 00000000000..13678d1097e --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json @@ -0,0 +1,94 @@ +{ + "OmniSharp__x86_64-darwin": { + "installPath": ".omnisharp/1.37.16", + "binaries": [ + "./mono.osx", + "./run" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/0ea1ea1eae48552a1992ed6df782353a/omnisharp-osx-1.37.16.zip", + "https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-osx-1.37.16.zip" + ], + "sha256": "0hhgfx7zs1rljhn3n9c7lci7j15yp2448z3f1d3c47a95l1hmlip" + }, + "OmniSharp__x86_64-linux": { + "installPath": ".omnisharp/1.37.16", + "binaries": [ + "./mono.linux-x86_64", + "./run" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/9ae3ed99fc0c41c7139751dde6f2bc78/omnisharp-linux-x64-1.37.16.zip", + "https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-linux-x64-1.37.16.zip" + ], + "sha256": "0a2basc6dw42fnjv9zz93ff0bsw2i3446gvcjx5mn5d8dasi483i" + }, + "Debugger__x86_64-darwin": { + "installPath": ".debugger/x86_64", + "binaries": [ + "./vsdbg-ui", + "./vsdbg" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/c1122f7141735472d9583c1124024c55/coreclr-debug-osx-x64.zip", + "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-osx-x64.zip" + ], + "sha256": "08z3k0h25gdsbmlxwayd94672hp2z7zmwdmd0nyr9j82izj3ci2m" + }, + "Debugger__aarch64-darwin": { + "installPath": ".debugger/arm64", + "binaries": [ + "./vsdbg-ui", + "./vsdbg" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/96a88189c7904a517f3bb59b2dba8bd1/coreclr-debug-osx-arm64.zip", + "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-osx-arm64.zip" + ], + "sha256": "113kz02ihvb4y5fj01wamqz2jsql2q7n7f55s9kzs9dsrmq5ffa0" + }, + "Debugger__aarch64-linux": { + "installPath": ".debugger", + "binaries": [ + "./vsdbg-ui", + "./vsdbg" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/7a723bfbda6d196c52084226b6835b36/coreclr-debug-linux-arm64.zip", + "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-linux-arm64.zip" + ], + "sha256": "1d4a5q3f7qfk3jq2i4f6g50i9i4z8z7g8ss083y9n5c1yj3629kw" + }, + "Debugger__x86_64-linux": { + "installPath": ".debugger", + "binaries": [ + "./vsdbg-ui", + "./vsdbg" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/dd019b4c839f458596e26bfcfe6a3e7f/coreclr-debug-linux-x64.zip", + "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-linux-x64.zip" + ], + "sha256": "0c5y0035sa07bl3m3iiqccqd92xjwpcfjrqhmi5xligk40q2i2gk" + }, + "Razor__x86_64-linux": { + "installPath": ".razor", + "binaries": [ + "./rzls" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/b8678010-2cd7-4201-a5e7-ba57920607d5/b846e9c7d7afdba54a72fae1dcb6c42c/razorlanguageserver-linux-x64-6.0.0-preview.5.21358.6.zip" + ], + "sha256": "0gb36nlb7fgcv03a0awna1qyrsky6ys5gkpsmvxc5j35f1yq337b" + }, + "Razor__x86_64-darwin": { + "installPath": ".razor", + "binaries": [ + "./rzls" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/b8678010-2cd7-4201-a5e7-ba57920607d5/ad846449769eb2ae810d0236823a6aaa/razorlanguageserver-osx-x64-6.0.0-preview.5.21358.6.zip" + ], + "sha256": "0iqinpwwlqwajdq4i1qbb9hfpfmgy17av95bpw02ad2f9fnyh572" + } +} diff --git a/pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/update-bin-srcs b/pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/update-bin-srcs new file mode 100755 index 00000000000..8c43231b1a7 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/ms-dotnettools-csharp/update-bin-srcs @@ -0,0 +1,21 @@ +#!/usr/bin/env nix-shell +#!nix-shell -I nixpkgs=../../../.. -i bash -p curl jq unzip +set -euf -o pipefail + +declare scriptDir +scriptDir=$(cd "$(dirname "$0")"; pwd) +1>&2 echo "scriptDir='$scriptDir'" + +. "$scriptDir/../_maintainers/update-bin-srcs-lib.sh" + +declare extPublisher="ms-dotnettools" +declare extName="csharp" +declare defaultExtVersion="1.23.16" +declare extVersion="${1:-$defaultExtVersion}" + +formatExtRuntimeDeps \ + "$extPublisher" "$extName" "$extVersion" \ + | computeAndAttachExtRtDepsChecksums \ + | jqStreamToJson \ + | tee "$scriptDir/rt-deps-bin-srcs.json" \ + | jq '.' diff --git a/pkgs/applications/editors/vscode/extensions/ms-toolsai-jupyter/default.nix b/pkgs/applications/editors/vscode/extensions/ms-toolsai-jupyter/default.nix new file mode 100644 index 00000000000..6be5e225fa3 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/ms-toolsai-jupyter/default.nix @@ -0,0 +1,42 @@ +{ lib, vscode-utils, jq, moreutils }: + +let + inherit (vscode-utils) buildVscodeMarketplaceExtension; + +in buildVscodeMarketplaceExtension { + mktplcRef = { + name = "jupyter"; + publisher = "ms-toolsai"; + version = "2021.9.1101343141"; + sha256 = "1c5dgkk5yn6a8k3blbqakqdy8ppwgfbm0ciki7ix696bvlksbpdg"; + }; + + nativeBuildInputs = [ + jq + moreutils + ]; + + postPatch = '' + # Patch 'packages.json' so that the expected '__metadata' field exists. + # This works around observed extension load failure on vscode's attempt + # to rewrite 'packages.json' with this new information. + print_jq_query() { + cat <<"EOF" + .__metadata = { + "id": "6c2f1801-1e7f-45b2-9b5c-7782f1e076e8", + "publisherId": "ac8eb7c9-3e59-4b39-8040-f0484d8170ce", + "publisherDisplayName": "Microsoft", + "installedTimestamp": 0 + } + EOF + } + jq "$(print_jq_query)" ./package.json | sponge ./package.json + ''; + + meta = with lib; { + description = "Jupyter extension for vscode"; + homepage = "https://github.com/microsoft/vscode-jupyter"; + license = licenses.mit; + maintainers = with maintainers; [ jraygauthier ]; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix b/pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix new file mode 100644 index 00000000000..d4200c33552 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix @@ -0,0 +1,134 @@ +# Based on previous attempts: +# - +# - +{ 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 +}: + +with lib; + +let + # https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually + libs = [ + # .NET Core + openssl + libkrb5 + zlib + icu + + # Credential Storage + libsecret + + # NodeJS + libX11 + + # https://github.com/flathub/com.visualstudio.code.oss/issues/11#issuecomment-392709170 + libunwind + lttng-ust + curl + + # General + gcc.cc.lib + util-linux # libuuid + ]; + +in ((vscode-utils.override { stdenv = gccStdenv; }).buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vsliveshare"; + publisher = "ms-vsliveshare"; + version = "1.0.5043"; + sha256 = "OdFOFvidUV/trySHvF8iELPNVP2kq8+vZQ4q4Nf7SiQ="; + }; +}).overrideAttrs({ nativeBuildInputs ? [], buildInputs ? [], ... }: { + nativeBuildInputs = nativeBuildInputs ++ [ + bash + jq + autoPatchelfHook + makeWrapper + ]; + 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 \ + --replace "'xsel'" "'${xsel}/bin/xsel'" + ''; + + postInstall = '' + cd $out/share/vscode/extensions/ms-vsliveshare.vsliveshare + + bash -s < null != ctags; + +let + liburcu-0-12 = liburcu.overrideAttrs (oldAttrs: rec { + version = "0.12.2"; + src = fetchurl { + url = "https://lttng.org/files/urcu/userspace-rcu-${version}.tar.bz2"; + sha256 = "0yx69kbx9zd6ayjzvwvglilhdnirq4f1x1sdv33jy8bc9wgc3vsf"; + }; + }); + + lttng-ust-2-10 = (lttng-ust.override { + liburcu = liburcu-0-12; + }).overrideAttrs (oldAttrs: rec { + version = "2.10.5"; + src = fetchurl { + url = "https://lttng.org/files/lttng-ust/lttng-ust-${version}.tar.bz2"; + sha256 = "0ddwk0nl28bkv2xb78gz16a2bvlpfbjmzwfbgwf5p1cq46dyvy86"; + }; + }); + + pythonDefaultsTo = if pythonUseFixed then "${python3}/bin/python" else "python"; + ctagsDefaultsTo = if ctagsUseFixed then "${ctags}/bin/ctags" else "ctags"; + + # The arch tag comes from 'PlatformName' defined here: + # https://github.com/Microsoft/vscode-python/blob/master/src/client/activation/types.ts + arch = + if stdenv.isLinux && stdenv.isx86_64 then "linux-x64" + else if stdenv.isDarwin then "osx-x64" + else throw "Only x86_64 Linux and Darwin are supported."; + + languageServerSha256 = { + linux-x64 = "1pmj5pb4xylx4gdx4zgmisn0si59qx51n2m1bh7clv29q6biw05n"; + osx-x64 = "0ishiy1z9dghj4ryh95vy8rw0v7q4birdga2zdb4a8am31wmp94b"; + }.${arch}; + + # version is languageServerVersion in the package.json + languageServer = extractNuGet rec { + name = "Python-Language-Server"; + version = "0.5.30"; + + src = fetchurl { + url = "https://pvsc.azureedge.net/python-language-server-stable/${name}-${arch}.${version}.nupkg"; + sha256 = languageServerSha256; + }; + }; +in vscode-utils.buildVscodeMarketplaceExtension rec { + mktplcRef = { + name = "python"; + publisher = "ms-python"; + version = "2021.11.1422169775"; + }; + + vsix = fetchurl { + name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; + url = "https://github.com/microsoft/vscode-python/releases/download/${mktplcRef.version}/ms-python-release.vsix"; + sha256 = "sha256-Y8Wbpuieca/edIWqgq+lGSUMABOGvO/GuujGlEGmoKs="; + }; + + buildInputs = [ + icu + curl + openssl + ] ++ lib.optionals stdenv.isLinux [ + lttng-ust-2-10 + musl + ]; + + nativeBuildInputs = [ + python3.pkgs.wrapPython + ] ++ lib.optionals stdenv.isLinux [ + autoPatchelfHook + ]; + + pythonPath = with python3.pkgs; [ + setuptools + ]; + + postPatch = '' + # Patch `packages.json` so that nix's *python* is used as default value for `python.pythonPath`. + substituteInPlace "./package.json" \ + --replace "\"default\": \"python\"" "\"default\": \"${pythonDefaultsTo}\"" + + # Patch `packages.json` so that nix's *ctags* is used as default value for `python.workspaceSymbols.ctagsPath`. + substituteInPlace "./package.json" \ + --replace "\"default\": \"ctags\"" "\"default\": \"${ctagsDefaultsTo}\"" + + # Similar cleanup to what's done in the `debugpy` python package. + # This prevent our autopatchelf logic to bark on unsupported binaries (`attach_x86.so` + # was problematic) but also should make our derivation less heavy. + ( + cd pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_attach_to_process + declare kept_aside="${{ + "x86_64-linux" = "attach_linux_amd64.so"; + "aarch64-darwin" = "attach_x86_64.dylib"; + "x86_64-darwin" = "attach_x86_64.dylib"; + }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")}" + mv "$kept_aside" "$kept_aside.hidden" + rm *.so *.dylib *.dll *.exe *.pdb + mv "$kept_aside.hidden" "$kept_aside" + ) + ''; + + postInstall = '' + mkdir -p "$out/$installPrefix/languageServer.${languageServer.version}" + cp -R --no-preserve=ownership ${languageServer}/* "$out/$installPrefix/languageServer.${languageServer.version}" + chmod -R +wx "$out/$installPrefix/languageServer.${languageServer.version}" + + patchPythonScript "$out/$installPrefix/pythonFiles/lib/python/isort/main.py" + ''; + + meta = with lib; { + license = licenses.mit; + platforms = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; + maintainers = with maintainers; [ jraygauthier jfchevrette ]; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/python/extract-nuget.nix b/pkgs/applications/editors/vscode/extensions/python/extract-nuget.nix new file mode 100644 index 00000000000..1e70cabe035 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/python/extract-nuget.nix @@ -0,0 +1,15 @@ +{ stdenv, unzip }: +{ name, version, src, ... }: + +stdenv.mkDerivation { + inherit name version src; + + nativeBuildInputs = [ unzip ]; + dontBuild = true; + unpackPhase = "unzip $src"; + installPhase = '' + mkdir -p "$out" + chmod -R +w . + find . -mindepth 1 -maxdepth 1 | xargs cp -a -t "$out" + ''; +} diff --git a/pkgs/applications/editors/vscode/extensions/remote-ssh/default.nix b/pkgs/applications/editors/vscode/extensions/remote-ssh/default.nix new file mode 100644 index 00000000000..3bfc94bb6ea --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/remote-ssh/default.nix @@ -0,0 +1,54 @@ +{ lib +, vscode-utils +, useLocalExtensions ? false +}: +# Note that useLocalExtensions requires that vscode-server is not running +# on host. If it is, you'll need to remove $HOME/.vscode-server, +# and redo the install by running "Connect to host" on client + +let + inherit (vscode-utils) buildVscodeMarketplaceExtension; + + # patch runs on remote machine hence use of which + # links to local node if version is 12 + patch = '' + f="$HOME/.vscode-server/bin/$COMMIT_ID/node" + localNodePath=''$(which node) + if [ -x "''$localNodePath" ]; then + localNodeVersion=''$(node -v) + if [ "\''${localNodeVersion:1:2}" = "12" ]; then + echo PATCH: replacing ''$f with ''$localNodePath + rm ''$f + ln -s ''$localNodePath ''$f + fi + fi + ${lib.optionalString useLocalExtensions '' + # Use local extensions + if [ -d $HOME/.vscode/extensions ]; then + if ! test -L "$HOME/.vscode-server/extensions"; then + mkdir -p $HOME/.vscode-server + ln -s $HOME/.vscode/extensions $HOME/.vscode-server/ + fi + fi + ''} + ''; +in +buildVscodeMarketplaceExtension { + mktplcRef = { + name = "remote-ssh"; + publisher = "ms-vscode-remote"; + version = "0.66.1"; + sha256 = "sha256-+v4UnGRG5xOc8k0IzvHUBHa128fhgd3jcmEuciiMQmI="; + }; + + postPatch = '' + substituteInPlace "out/extension.js" \ + --replace "# install extensions" '${patch}' + ''; + + meta = with lib; { + description = "Use any remote machine with a SSH server as your development environment."; + license = licenses.unfree; + maintainers = with maintainers; [ SuperSandro2000 tbenst ]; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/rescript/default.nix b/pkgs/applications/editors/vscode/extensions/rescript/default.nix new file mode 100644 index 00000000000..5bad9b2e628 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/rescript/default.nix @@ -0,0 +1,28 @@ +{ lib, stdenv, vscode-utils, callPackage }: +let + rescript-editor-analysis = (callPackage ./rescript-editor-analysis.nix { }); + arch = + if stdenv.isLinux then "linux" + else if stdenv.isDarwin then "darwin" + else throw "Unsupported platform"; + analysisDir = "server/analysis_binaries/${arch}"; +in +vscode-utils.buildVscodeMarketplaceExtension rec { + mktplcRef = { + name = "rescript-vscode"; + publisher = "chenglou92"; + version = "1.1.3"; + sha256 = "1c1ipxgm0f0a3vlnhr0v85jr5l3rwpjzh9w8nv2jn5vgvpas0b2a"; + }; + postPatch = '' + rm -r ${analysisDir} + ln -s ${rescript-editor-analysis}/bin ${analysisDir} + ''; + + meta = with lib; { + description = "The official VSCode plugin for ReScript"; + homepage = "https://github.com/rescript-lang/rescript-vscode"; + maintainers = with maintainers; [ dlip ]; + license = licenses.mit; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix b/pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix new file mode 100644 index 00000000000..518280b4b06 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub, bash, ocaml }: + +stdenv.mkDerivation { + pname = "rescript-editor-analysis"; + version = "1.1.3"; + + src = fetchFromGitHub { + owner = "rescript-lang"; + repo = "rescript-vscode"; + rev = "8d0412a72307b220b7f5774e2612760a2d429059"; + sha256 = "rHQtfuIiEWlSPuZvNpEafsvlXCj2Uv1YRR1IfvKfC2s="; + }; + + nativeBuildInputs = [ ocaml ]; + + postPatch = '' + cd analysis + substituteInPlace Makefile --replace "/bin/bash" "${bash}/bin/bash" + ''; + + installPhase = '' + install -D -m0555 rescript-editor-analysis.exe $out/bin/rescript-editor-analysis.exe + ''; + + meta = with lib; { + description = "Analysis binary for the ReScript VSCode plugin"; + homepage = "https://github.com/rescript-lang/rescript-vscode"; + maintainers = with maintainers; [ dlip ]; + license = licenses.mit; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/rust-analyzer/build-deps/package.json b/pkgs/applications/editors/vscode/extensions/rust-analyzer/build-deps/package.json new file mode 100644 index 00000000000..54a931eee86 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/rust-analyzer/build-deps/package.json @@ -0,0 +1,26 @@ +{ + "name": "rust-analyzer", + "version": "0.2.834", + "dependencies": { + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "vscode-languageclient": "8.0.0-next.2", + "d3": "^7.1.0", + "d3-graphviz": "^4.0.0", + "@types/glob": "^7.1.4", + "@types/mocha": "^8.2.3", + "@types/node": "~14.17.5", + "@types/node-fetch": "^2.5.11", + "@types/vscode": "^1.57.0", + "@typescript-eslint/eslint-plugin": "^4.28.2", + "@typescript-eslint/parser": "^4.28.2", + "eslint": "^7.30.0", + "glob": "^7.1.6", + "mocha": "^9.0.2", + "tslib": "^2.3.0", + "typescript": "^4.3.5", + "typescript-formatter": "^7.2.2", + "vsce": "^1.95.1", + "vscode-test": "^1.5.1" + } +} diff --git a/pkgs/applications/editors/vscode/extensions/rust-analyzer/default.nix b/pkgs/applications/editors/vscode/extensions/rust-analyzer/default.nix new file mode 100644 index 00000000000..271607af6bd --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/rust-analyzer/default.nix @@ -0,0 +1,88 @@ +{ lib +, fetchFromGitHub +, vscode-utils +, jq +, rust-analyzer +, nodePackages +, moreutils +, esbuild +, pkg-config +, libsecret +, stdenv +, darwin +, setDefaultServerPath ? true +}: + +let + pname = "rust-analyzer"; + publisher = "matklad"; + + # Use the plugin version as in vscode marketplace, updated by update script. + inherit (vsix) version; + + releaseTag = "2021-11-29"; + + src = fetchFromGitHub { + owner = "rust-analyzer"; + repo = "rust-analyzer"; + rev = releaseTag; + sha256 = "sha256-vh7z8jupVxXPOko3sWUsOB7eji/7lKfwJ/CE3iw97Sw="; + }; + + build-deps = nodePackages."rust-analyzer-build-deps-../../applications/editors/vscode/extensions/rust-analyzer/build-deps"; + # FIXME: Making a new derivation to link `node_modules` and run `npm run package` + # will cause a build failure. + vsix = build-deps.override { + src = "${src}/editors/code"; + outputs = [ "vsix" "out" ]; + + inherit releaseTag; + + nativeBuildInputs = [ + jq moreutils esbuild + # Required by `keytar`, which is a dependency of `vsce`. + pkg-config libsecret + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.AppKit + darwin.apple_sdk.frameworks.Security + ]; + + # Follows https://github.com/rust-analyzer/rust-analyzer/blob/41949748a6123fd6061eb984a47f4fe780525e63/xtask/src/dist.rs#L39-L65 + postInstall = '' + jq ' + .version = $ENV.version | + .releaseTag = $ENV.releaseTag | + .enableProposedApi = false | + walk(del(.["$generated-start"]?) | del(.["$generated-end"]?)) + ' package.json | sponge package.json + + mkdir -p $vsix + # vsce ask for continue due to missing LICENSE.md + # Should be removed after https://github.com/rust-analyzer/rust-analyzer/commit/acd5c1f19bf7246107aaae7b6fe3f676a516c6d2 + echo y | npx vsce package -o $vsix/${pname}.zip + ''; + }; + +in +vscode-utils.buildVscodeExtension { + inherit version vsix; + name = "${pname}-${version}"; + src = "${vsix}/${pname}.zip"; + vscodeExtUniqueId = "${publisher}.${pname}"; + + nativeBuildInputs = lib.optionals setDefaultServerPath [ jq moreutils ]; + + preInstall = lib.optionalString setDefaultServerPath '' + jq '.contributes.configuration.properties."rust-analyzer.server.path".default = $s' \ + --arg s "${rust-analyzer}/bin/rust-analyzer" \ + package.json | sponge package.json + ''; + + meta = with lib; { + description = "An alternative rust language server to the RLS"; + homepage = "https://github.com/rust-analyzer/rust-analyzer"; + license = with licenses; [ mit asl20 ]; + maintainers = with maintainers; [ ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/terraform/default.nix b/pkgs/applications/editors/vscode/extensions/terraform/default.nix new file mode 100644 index 00000000000..e6e094bb1cb --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/terraform/default.nix @@ -0,0 +1,20 @@ +{ lib, vscode-utils, terraform-ls }: +vscode-utils.buildVscodeMarketplaceExtension rec { + mktplcRef = { + name = "terraform"; + publisher = "hashicorp"; + version = "2.19.0"; + sha256 = "sha256-k/fcEJuELz0xkwivSrP6Nxtz861BLq1wR2ZDMXVrvkY="; + }; + + patches = [ ./fix-terraform-ls.patch ]; + + postPatch = '' + substituteInPlace out/serverPath.js --replace TERRAFORM-LS-PATH ${terraform-ls}/bin/terraform-ls + ''; + + meta = with lib; { + license = licenses.mit; + maintainers = with maintainers; [ rhoriguchi ]; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/terraform/fix-terraform-ls.patch b/pkgs/applications/editors/vscode/extensions/terraform/fix-terraform-ls.patch new file mode 100644 index 00000000000..e2dcd0b70aa --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/terraform/fix-terraform-ls.patch @@ -0,0 +1,19 @@ +diff --git a/out/serverPath.js b/out/serverPath.js +index fafa915..2e6d376 100644 +--- a/out/serverPath.js ++++ b/out/serverPath.js +@@ -18,7 +18,13 @@ exports.CUSTOM_BIN_PATH_OPTION_NAME = 'languageServer.pathToBinary'; + class ServerPath { + constructor(context) { + this.context = context; +- this.customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME); ++ ++ const customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME); ++ if (!customBinPath) { ++ this.customBinPath = 'TERRAFORM-LS-PATH'; ++ } else { ++ this.customBinPath = customBinPath; ++ } + } + installPath() { + return path.join(this.context.globalStorageUri.fsPath, INSTALL_FOLDER_NAME); diff --git a/pkgs/applications/editors/vscode/extensions/updateSettings.nix b/pkgs/applications/editors/vscode/extensions/updateSettings.nix new file mode 100644 index 00000000000..443b4093027 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/updateSettings.nix @@ -0,0 +1,39 @@ +# Updates the vscode setting file base on a nix expression +# should run from the workspace root. +{ writeShellScriptBin +, lib +, jq +}: +##User Input +{ settings ? {} +# if marked as true will create an empty json file if does not exist +, createIfDoesNotExists ? true +, vscodeSettingsFile ? ".vscode/settings.json" +, userSettingsFolder ? "" +, symlinkFromUserSetting ? false +}: +let + + updateVSCodeSettingsCmd = '' + ( + echo 'updateSettings.nix: Updating ${vscodeSettingsFile}...' + oldSettings=$(cat ${vscodeSettingsFile}) + echo $oldSettings' ${builtins.toJSON settings}' | ${jq}/bin/jq -s add > ${vscodeSettingsFile} + )''; + + createEmptySettingsCmd = ''mkdir -p .vscode && echo "{}" > ${vscodeSettingsFile}''; + fileName = builtins.baseNameOf vscodeSettingsFile; + symlinkFromUserSettingCmd = lib.optionalString symlinkFromUserSetting + '' && mkdir -p "${userSettingsFolder}" && ln -sfv "$(pwd)/${vscodeSettingsFile}" "${userSettingsFolder}/" ''; +in + + writeShellScriptBin ''vscodeNixUpdate-${lib.removeSuffix ".json" (fileName)}'' + (lib.optionalString (settings != {}) + (if createIfDoesNotExists then '' + [ ! -f "${vscodeSettingsFile}" ] && ${createEmptySettingsCmd} + ${updateVSCodeSettingsCmd} ${symlinkFromUserSettingCmd} + '' + else ''[ -f "${vscodeSettingsFile}" ] && ${updateVSCodeSettingsCmd} ${symlinkFromUserSettingCmd} + '' + ) + ) diff --git a/pkgs/applications/editors/vscode/extensions/updateSettingsTest.nix b/pkgs/applications/editors/vscode/extensions/updateSettingsTest.nix new file mode 100644 index 00000000000..097b9cad166 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/updateSettingsTest.nix @@ -0,0 +1,6 @@ +with import {}; +callPackage (import ./updateSettings.nix) {} { + settings = { + a = "fdsdf"; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh b/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh new file mode 100755 index 00000000000..6fff7454493 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh @@ -0,0 +1,90 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p curl jq unzip +# shellcheck shell=bash +set -eu -o pipefail + +# can be added to your configuration with the following command and snippet: +# $ ./pkgs/applications/editors/vscode/extensions/update_installed_exts.sh > extensions.nix +# +# packages = with pkgs; +# (vscode-with-extensions.override { +# vscodeExtensions = map +# (extension: vscode-utils.buildVscodeMarketplaceExtension { +# mktplcRef = { +# inherit (extension) name publisher version sha256; +# }; +# }) +# (import ./extensions.nix).extensions; +# }) +# ] + +# Helper to just fail with a message and non-zero exit code. +function fail() { + echo "$1" >&2 + exit 1 +} + +# Helper to clean up after ourselves if we're killed by SIGINT. +function clean_up() { + TDIR="${TMPDIR:-/tmp}" + echo "Script killed, cleaning up tmpdirs: $TDIR/vscode_exts_*" >&2 + rm -Rf "$TDIR/vscode_exts_*" +} + +function get_vsixpkg() { + N="$1.$2" + + # Create a tempdir for the extension download. + EXTTMP=$(mktemp -d -t vscode_exts_XXXXXXXX) + + URL="https://$1.gallery.vsassets.io/_apis/public/gallery/publisher/$1/extension/$2/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" + + # Quietly but delicately curl down the file, blowing up at the first sign of trouble. + curl --silent --show-error --retry 3 --fail -X GET -o "$EXTTMP/$N.zip" "$URL" + # Unpack the file we need to stdout then pull out the version + VER=$(jq -r '.version' <(unzip -qc "$EXTTMP/$N.zip" "extension/package.json")) + # Calculate the SHA + SHA=$(nix-hash --flat --base32 --type sha256 "$EXTTMP/$N.zip") + + # Clean up. + rm -Rf "$EXTTMP" + # I don't like 'rm -Rf' lurking in my scripts but this seems appropriate. + + cat <<-EOF + { + name = "$2"; + publisher = "$1"; + version = "$VER"; + sha256 = "$SHA"; + } +EOF +} + +# See if we can find our `code` binary somewhere. +if [ $# -ne 0 ]; then + CODE=$1 +else + CODE=$(command -v code || command -v codium) +fi + +if [ -z "$CODE" ]; then + # Not much point continuing. + fail "VSCode executable not found" +fi + +# Try to be a good citizen and clean up after ourselves if we're killed. +trap clean_up SIGINT + +# Begin the printing of the nix expression that will house the list of extensions. +printf '{ extensions = [\n' + +# Note that we are only looking to update extensions that are already installed. +for i in $($CODE --list-extensions) +do + OWNER=$(echo "$i" | cut -d. -f1) + EXT=$(echo "$i" | cut -d. -f2) + + get_vsixpkg "$OWNER" "$EXT" +done +# Close off the nix expression. +printf '];\n}' diff --git a/pkgs/applications/editors/vscode/extensions/vscode-lldb/build-deps/package.json b/pkgs/applications/editors/vscode/extensions/vscode-lldb/build-deps/package.json new file mode 100644 index 00000000000..2e5670d3039 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscode-lldb/build-deps/package.json @@ -0,0 +1,23 @@ +{ + "name": "vscode-lldb", + "version": "1.6.8", + "dependencies": { + "string-argv": "^0.3.1", + "yaml": "^1.10.0", + "yauzl": "^2.10.0", + "@types/vscode": "^1.31.0", + "@types/node": "^8.10.50", + "@types/mocha": "^7.0.1", + "@types/yauzl": "^2.9.0", + "typescript": "^4.2.4", + "mocha": "^8.4.0", + "source-map-support": "^0.5.12", + "memory-streams": "^0.1.3", + "vscode-debugprotocol": "^1.47.0", + "vscode-debugadapter-testsupport": "^1.47.0", + "vsce": "=1.88.0", + "webpack": "^5.37.1", + "webpack-cli": "^4.7.0", + "ts-loader": "^8.0.0" + } +} diff --git a/pkgs/applications/editors/vscode/extensions/vscode-lldb/cmake-build-extension-only.patch b/pkgs/applications/editors/vscode/extensions/vscode-lldb/cmake-build-extension-only.patch new file mode 100644 index 00000000000..fb55816b942 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscode-lldb/cmake-build-extension-only.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 37745b5..cad11a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,13 +16,6 @@ endif() + set(VERSION "${VERSION}${VERSION_SUFFIX}") + message("Version ${VERSION}") + +-set(LLDB_PACKAGE $ENV{LLDB_PACKAGE} CACHE PATH "Zip archive containing LLDB files") +-if (LLDB_PACKAGE) +- message("Using LLDB_PACKAGE=${LLDB_PACKAGE}") +-else() +- message(FATAL_ERROR "LLDB_PACKAGE not set." ) +-endif() +- + set(TEST_TIMEOUT 5000 CACHE STRING "Test timeout [ms]") + + # General OS-specific definitions +@@ -87,16 +80,6 @@ configure_file(package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY) + configure_file(webpack.config.js ${CMAKE_CURRENT_BINARY_DIR}/webpack.config.js @ONLY) + file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + +-# Run 'npm install' +-execute_process( +- COMMAND ${NPM} ci # like install, but actually respects package-lock file. +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +- RESULT_VARIABLE Result +-) +-if (NOT ${Result} EQUAL 0) +- message(FATAL_ERROR "npm intall failed: ${Result}") +-endif() +- + # Copy it back, so we can commit the lock file. + file(COPY ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}) + + diff --git a/pkgs/applications/editors/vscode/extensions/vscode-lldb/default.nix b/pkgs/applications/editors/vscode/extensions/vscode-lldb/default.nix new file mode 100644 index 00000000000..c9d4deebdfd --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscode-lldb/default.nix @@ -0,0 +1,104 @@ +{ lib, stdenv, fetchFromGitHub, rustPlatform, makeWrapper, callPackage +, nodePackages, cmake, nodejs, unzip, python3 +}: +assert lib.versionAtLeast python3.version "3.5"; +let + publisher = "vadimcn"; + pname = "vscode-lldb"; + version = "1.6.10"; + + vscodeExtUniqueId = "${publisher}.${pname}"; + + src = fetchFromGitHub { + owner = "vadimcn"; + repo = "vscode-lldb"; + rev = "v${version}"; + sha256 = "sha256-4PM/818UFHRZekfbdhS/Rz0Pu6HOjJEldi4YuBWECnI="; + }; + + lldb = callPackage ./lldb.nix {}; + + adapter = rustPlatform.buildRustPackage { + pname = "${pname}-adapter"; + inherit version src; + + # It will pollute the build environment of `buildRustPackage`. + cargoPatches = [ ./reset-cargo-config.patch ]; + + cargoSha256 = "sha256-Ch1X2vN+p7oCqSs/GIu5IzG+pcSKmQ+VwP2T8ycRhos="; + + nativeBuildInputs = [ makeWrapper ]; + + buildAndTestSubdir = "adapter"; + + buildFeatures = [ "weak-linkage" ]; + + cargoBuildFlags = [ + "--lib" + "--bin=codelldb" + ]; + + # Tests are linked to liblldb but it is not available here. + doCheck = false; + }; + + nodeDeps = nodePackages."vscode-lldb-build-deps-../../applications/editors/vscode/extensions/vscode-lldb/build-deps"; + +in stdenv.mkDerivation { + pname = "vscode-extension-${publisher}-${pname}"; + inherit src version vscodeExtUniqueId; + + installPrefix = "share/vscode/extensions/${vscodeExtUniqueId}"; + + nativeBuildInputs = [ cmake nodejs unzip makeWrapper ]; + + patches = [ ./cmake-build-extension-only.patch ]; + + postConfigure = '' + cp -r ${nodeDeps}/lib/node_modules/vscode-lldb/{node_modules,package-lock.json} . + ''; + + cmakeFlags = [ + # Do not append timestamp to version. + "-DVERSION_SUFFIX=" + ]; + makeFlags = [ "vsix_bootstrap" ]; + + installPhase = '' + ext=$out/$installPrefix + runHook preInstall + + unzip ./codelldb-bootstrap.vsix 'extension/*' -d ./vsix-extracted + + mkdir -p $ext/{adapter,formatters} + mv -t $ext vsix-extracted/extension/* + cp -t $ext/adapter ${adapter}/{bin,lib}/* ../adapter/*.py + wrapProgram $ext/adapter/codelldb \ + --set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server" + cp -t $ext/formatters ../formatters/*.py + ln -s ${lldb.lib} $ext/lldb + # Mark that all components are installed. + touch $ext/platform.ok + + runHook postInstall + ''; + + # `adapter` will find python binary and libraries at runtime. + postFixup = '' + wrapProgram $out/$installPrefix/adapter/codelldb \ + --prefix PATH : "${python3}/bin" \ + --prefix LD_LIBRARY_PATH : "${python3}/lib" + ''; + + passthru = { + inherit lldb adapter; + }; + + meta = with lib; { + description = "A native debugger extension for VSCode based on LLDB"; + homepage = "https://github.com/vadimcn/vscode-lldb"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ nigelgbanks ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/vscode-lldb/lldb.nix b/pkgs/applications/editors/vscode/extensions/vscode-lldb/lldb.nix new file mode 100644 index 00000000000..e04e9ad0b5b --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscode-lldb/lldb.nix @@ -0,0 +1,23 @@ +# Patched lldb for Rust language support. +{ lldb_12, fetchFromGitHub }: +let + llvmSrc = fetchFromGitHub { + owner = "vadimcn"; + repo = "llvm-project"; + rev = "f2e9ff34256cd8c6feaf14359f88ad3f538ed687"; + sha256 = "sha256-5UsCBu3rtt+l2HZiCswoQJPPh8T6y471TBF4AypdF9I="; + }; +in lldb_12.overrideAttrs (oldAttrs: { + src = "${llvmSrc}/lldb"; + + passthru = (oldAttrs.passthru or {}) // { + inherit llvmSrc; + }; + + doInstallCheck = true; + postInstallCheck = (oldAttrs.postInstallCheck or "") + '' + versionOutput="$($out/bin/lldb --version)" + echo "'lldb --version' returns: $versionOutput" + echo "$versionOutput" | grep -q 'rust-enabled' + ''; +}) diff --git a/pkgs/applications/editors/vscode/extensions/vscode-lldb/reset-cargo-config.patch b/pkgs/applications/editors/vscode/extensions/vscode-lldb/reset-cargo-config.patch new file mode 100644 index 00000000000..e95df0a9cef --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscode-lldb/reset-cargo-config.patch @@ -0,0 +1,19 @@ +diff --git a/.cargo/config b/.cargo/config +index c3c75e4..e69de29 100644 +--- a/.cargo/config ++++ b/.cargo/config +@@ -1,14 +0,0 @@ +-[build] +-target-dir = "build/target" +- +-[target.armv7-unknown-linux-gnueabihf] +-rustflags = [ +- "-C", "link-arg=-fuse-ld=lld", +- "-C", "link-arg=--target=armv7-unknown-linux-gnueabihf", +-] +- +-[target.aarch64-unknown-linux-gnu] +-rustflags = [ +- "-C", "link-arg=-fuse-ld=lld", +- "-C", "link-arg=--target=aarch64-unknown-linux-gnu", +-] diff --git a/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh b/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh new file mode 100755 index 00000000000..2fe0cc5cf29 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p jq nix-prefetch +set -eo pipefail +cd "$(dirname "${BASH_SOURCE[0]}")" +if [[ $# -ne 1 ]]; then + echo "Usage: ./update.sh " + exit 1 +fi + +echo " +FIXME: This script doesn't update patched lldb. Please manually check branches +of https://github.com/vadimcn/llvm-project and update lldb with correct version of LLVM. +" + +nixpkgs=../../../.. +nixFile=./default.nix +owner=vadimcn +repo=vscode-lldb +version="$1" + +sed -E 's/\bversion = ".*?"/version = "'$version'"/' --in-place "$nixFile" +srcHash=$(nix-prefetch fetchFromGitHub --owner vadimcn --repo vscode-lldb --rev "v$version") +sed -E 's#\bsha256 = ".*?"#sha256 = "'$srcHash'"#' --in-place "$nixFile" +cargoHash=$(nix-prefetch "{ sha256 }: (import $nixpkgs {}).vscode-extensions.vadimcn.vscode-lldb.adapter.cargoDeps.overrideAttrs (_: { outputHash = sha256; })") +sed -E 's#\bcargoSha256 = ".*?"#cargoSha256 = "'$cargoHash'"#' --in-place "$nixFile" + +src="$(nix-build $nixpkgs -A vscode-extensions.vadimcn.vscode-lldb.src --no-out-link)" +oldDeps="$(jq '.dependencies' build-deps/package.json)" +newDeps="$(jq '.dependencies + .devDependencies' "$src/package.json")" +jq '{ name, version: $version, dependencies: (.dependencies + .devDependencies) }' \ + --arg version "$version" \ + "$src/package.json" \ + > build-deps/package.json + +if [[ "$oldDeps" == "$newDeps" ]]; then + echo "Dependencies not changed" + sed '/"vscode-lldb-build-deps-/,+3 s/version = ".*"/version = "'"$version"'"/' \ + --in-place "$nixpkgs/pkgs/development/node-packages/node-packages.nix" +else + echo "Dependencies changed" + # Regenerate nodePackages. + cd "$nixpkgs/pkgs/development/node-packages" + exec ./generate.sh +fi diff --git a/pkgs/applications/editors/vscode/extensions/vscode-utils.nix b/pkgs/applications/editors/vscode/extensions/vscode-utils.nix new file mode 100644 index 00000000000..49b730361af --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscode-utils.nix @@ -0,0 +1,100 @@ +{ stdenv, lib, buildEnv, writeShellScriptBin, fetchurl, vscode, unzip, jq }: +let + buildVscodeExtension = a@{ + name, + src, + # Same as "Unique Identifier" on the extension's web page. + # For the moment, only serve as unique extension dir. + vscodeExtUniqueId, + configurePhase ? '' + runHook preConfigure + runHook postConfigure + '', + buildPhase ?'' + runHook preBuild + runHook postBuild + '', + dontPatchELF ? true, + dontStrip ? true, + nativeBuildInputs ? [], + ... + }: + stdenv.mkDerivation ((removeAttrs a [ "vscodeExtUniqueId" ]) // { + + name = "vscode-extension-${name}"; + + inherit vscodeExtUniqueId; + inherit configurePhase buildPhase dontPatchELF dontStrip; + + installPrefix = "share/vscode/extensions/${vscodeExtUniqueId}"; + + nativeBuildInputs = [ unzip ] ++ nativeBuildInputs; + + installPhase = '' + + runHook preInstall + + mkdir -p "$out/$installPrefix" + find . -mindepth 1 -maxdepth 1 | xargs -d'\n' mv -t "$out/$installPrefix/" + + runHook postInstall + ''; + + }); + + fetchVsixFromVscodeMarketplace = mktplcExtRef: + fetchurl((import ./mktplcExtRefToFetchArgs.nix mktplcExtRef)); + + buildVscodeMarketplaceExtension = a@{ + name ? "", + src ? null, + vsix ? null, + mktplcRef, + ... + }: assert "" == name; assert null == src; + buildVscodeExtension ((removeAttrs a [ "mktplcRef" "vsix" ]) // { + name = "${mktplcRef.publisher}-${mktplcRef.name}-${mktplcRef.version}"; + src = if (vsix != null) + then vsix + else fetchVsixFromVscodeMarketplace mktplcRef; + vscodeExtUniqueId = "${mktplcRef.publisher}.${mktplcRef.name}"; + }); + + mktplcRefAttrList = [ + "name" + "publisher" + "version" + "sha256" + ]; + + mktplcExtRefToExtDrv = ext: + buildVscodeMarketplaceExtension ((removeAttrs ext mktplcRefAttrList) // { + mktplcRef = ext; + }); + + extensionFromVscodeMarketplace = mktplcExtRefToExtDrv; + extensionsFromVscodeMarketplace = mktplcExtRefList: + builtins.map extensionFromVscodeMarketplace mktplcExtRefList; + + vscodeWithConfiguration = import ./vscodeWithConfiguration.nix { + inherit lib extensionsFromVscodeMarketplace writeShellScriptBin; + vscodeDefault = vscode; + }; + + + vscodeExts2nix = import ./vscodeExts2nix.nix { + inherit lib writeShellScriptBin; + vscodeDefault = vscode; + }; + + vscodeEnv = import ./vscodeEnv.nix { + inherit lib buildEnv writeShellScriptBin extensionsFromVscodeMarketplace jq; + vscodeDefault = vscode; + }; +in +{ + inherit fetchVsixFromVscodeMarketplace buildVscodeExtension + buildVscodeMarketplaceExtension extensionFromVscodeMarketplace + extensionsFromVscodeMarketplace + vscodeWithConfiguration vscodeExts2nix vscodeEnv; +} diff --git a/pkgs/applications/editors/vscode/extensions/vscodeEnv.nix b/pkgs/applications/editors/vscode/extensions/vscodeEnv.nix new file mode 100644 index 00000000000..7c58a4bdfb3 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscodeEnv.nix @@ -0,0 +1,86 @@ +#Use vscodeWithConfiguration and vscodeExts2nix to create a vscode executable. When the executable exits, it updates the mutable extension file, which is imported when evaluated by Nix later. +{ lib +, buildEnv +, writeShellScriptBin +, extensionsFromVscodeMarketplace +, vscodeDefault +, jq +}: +##User input +{ vscode ? vscodeDefault +, nixExtensions ? [] +, vscodeExtsFolderName ? ".vscode-exts" +# will add to the command updateSettings (which will run on executing vscode) settings to override in settings.json file +, settings ? {} +, createSettingsIfDoesNotExists ? true +, launch ? {} +, createLaunchIfDoesNotExists ? true +# will add to the command updateKeybindings(which will run on executing vscode) keybindings to override in keybinding.json file +, keybindings ? {} +, createKeybindingsIfDoesNotExists ? true +, user-data-dir ? ''"''${TMP}''${name}"/vscode-data-dir'' +# if file exists will use it and import the extensions in it into this dervation else will use empty extensions list +# this file will be created/updated by vscodeExts2nix when vscode exists +, mutableExtensionsFile +}: +let + mutableExtensionsFilePath = toString mutableExtensionsFile; + mutableExtensions = if builtins.pathExists mutableExtensionsFile + then import mutableExtensionsFilePath else []; + vscodeWithConfiguration = import ./vscodeWithConfiguration.nix { + inherit lib writeShellScriptBin extensionsFromVscodeMarketplace; + vscodeDefault = vscode; + } + { + inherit nixExtensions mutableExtensions vscodeExtsFolderName user-data-dir; + }; + + updateSettings = import ./updateSettings.nix { inherit lib writeShellScriptBin jq; }; + userSettingsFolder = "${ user-data-dir }/User"; + + updateSettingsCmd = updateSettings { + settings = { + "extensions.autoCheckUpdates" = false; + "extensions.autoUpdate" = false; + "update.mode" = "none"; + } // settings; + inherit userSettingsFolder; + createIfDoesNotExists = createSettingsIfDoesNotExists; + symlinkFromUserSetting = (user-data-dir != ""); + }; + + updateLaunchCmd = updateSettings { + settings = launch; + createIfDoesNotExists = createLaunchIfDoesNotExists; + vscodeSettingsFile = ".vscode/launch.json"; + }; + + updateKeybindingsCmd = updateSettings { + settings = keybindings; + createIfDoesNotExists = createKeybindingsIfDoesNotExists; + vscodeSettingsFile = ".vscode/keybindings.json"; + inherit userSettingsFolder; + symlinkFromUserSetting = (user-data-dir != ""); + }; + + vscodeExts2nix = import ./vscodeExts2nix.nix { + inherit lib writeShellScriptBin; + vscodeDefault = vscodeWithConfiguration; + } + { + extensionsToIgnore = nixExtensions; + extensions = mutableExtensions; + }; + code = writeShellScriptBin "code" '' + ${updateSettingsCmd}/bin/vscodeNixUpdate-settings + ${updateLaunchCmd}/bin/vscodeNixUpdate-launch + ${updateKeybindingsCmd}/bin/vscodeNixUpdate-keybindings + ${vscodeWithConfiguration}/bin/code --wait "$@" + echo 'running vscodeExts2nix to update ${mutableExtensionsFilePath}...' + ${vscodeExts2nix}/bin/vscodeExts2nix > ${mutableExtensionsFilePath} + ''; +in +buildEnv { + name = "vscodeEnv"; + paths = [ code vscodeExts2nix updateSettingsCmd updateLaunchCmd updateKeybindingsCmd ]; +} diff --git a/pkgs/applications/editors/vscode/extensions/vscodeEnvTest.nix b/pkgs/applications/editors/vscode/extensions/vscodeEnvTest.nix new file mode 100644 index 00000000000..19a9edbf1af --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscodeEnvTest.nix @@ -0,0 +1,11 @@ +with import {}; +callPackage (import ./vscodeEnv.nix) { + extensionsFromVscodeMarketplace = vscode-utils.extensionsFromVscodeMarketplace; + vscodeDefault = vscode; +} { + mutableExtensionsFile = ./extensions.nix; + settings = { + a = "fdsdf"; + t = "test"; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/vscodeExts2nix.nix b/pkgs/applications/editors/vscode/extensions/vscodeExts2nix.nix new file mode 100644 index 00000000000..58cbe663c90 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscodeExts2nix.nix @@ -0,0 +1,44 @@ +# based on the passed vscode will stdout a nix expression with the installed vscode extensions +{ lib +, vscodeDefault +, writeShellScriptBin +}: + +##User input +{ vscode ? vscodeDefault +, extensionsToIgnore ? [] +# will use those extensions to get sha256 if still exists when executed. +, extensions ? [] +}: +let + mktplcExtRefToFetchArgs = import ./mktplcExtRefToFetchArgs.nix; +in +writeShellScriptBin "vscodeExts2nix" '' + echo '[' + + for line in $(${vscode}/bin/code --list-extensions --show-versions \ + ${lib.optionalString (extensionsToIgnore != []) '' + | grep -v -i '^\(${lib.concatMapStringsSep "\\|" (e : "${e.publisher}.${e.name}") extensionsToIgnore}\)' + ''} + ) ; do + [[ $line =~ ([^.]*)\.([^@]*)@(.*) ]] + name=''${BASH_REMATCH[2]} + publisher=''${BASH_REMATCH[1]} + version=''${BASH_REMATCH[3]} + + extensions="${lib.concatMapStringsSep "." (e : "${e.publisher}${e.name}@${e.sha256}") extensions}" + reCurrentExt=$publisher$name"@([^.]*)" + if [[ $extensions =~ $reCurrentExt ]]; then + sha256=''${BASH_REMATCH[1]} + else + sha256=$( + nix-prefetch-url "${(mktplcExtRefToFetchArgs {publisher = ''"$publisher"''; name = ''"$name"''; version = ''"$version"'';}).url}" 2> /dev/null + ) + fi + + echo "{ name = \"''${name}\"; publisher = \"''${publisher}\"; version = \"''${version}\"; sha256 = \"''${sha256}\"; }" + done + + + echo ']' +'' diff --git a/pkgs/applications/editors/vscode/extensions/vscodeWithConfiguration.nix b/pkgs/applications/editors/vscode/extensions/vscodeWithConfiguration.nix new file mode 100644 index 00000000000..39479d7c2f2 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscodeWithConfiguration.nix @@ -0,0 +1,54 @@ +# wrapper over vscode to control extensions per project (extensions folder will be created in execution path) +{ lib +, writeShellScriptBin +, extensionsFromVscodeMarketplace +, vscodeDefault +}: +## User input +{ vscode ? vscodeDefault +# extensions to be symlinked into the project's extensions folder +, nixExtensions ? [] +# extensions to be copied into the project's extensions folder +, mutableExtensions ? [] +, vscodeExtsFolderName ? ".vscode-exts" +, user-data-dir ? ''"''${TMP}vscodeWithConfiguration/vscode-data-dir"'' +}: +let + nixExtsDrvs = extensionsFromVscodeMarketplace nixExtensions; + mutExtsDrvs = extensionsFromVscodeMarketplace mutableExtensions; + mutableExtsPaths = lib.forEach mutExtsDrvs ( e: + { + origin = "${e}/share/vscode/extensions/${e.vscodeExtUniqueId}"; + target = ''${vscodeExtsFolderName}/${e.vscodeExtUniqueId}-${(lib.findSingle (ext: "${ext.publisher}.${ext.name}" == e.vscodeExtUniqueId) "" "m" mutableExtensions ).version}''; + } + ); + + #removed not defined extensions + rmExtensions = lib.optionalString (nixExtensions++mutableExtensions != []) '' + find ${vscodeExtsFolderName} -mindepth 1 -maxdepth 1 ${ + lib.concatMapStringsSep " " (e : "! -iname ${e.publisher}.${e.name} ") nixExtensions + + + lib.concatMapStringsSep " " (e : "! -iname ${e.publisher}.${e.name}-${e.version} ") mutableExtensions + } -exec rm -rf {} \; + ''; + #copy mutable extension out of the nix store + cpExtensions = '' + ${lib.concatMapStringsSep "\n" (e : "ln -sfn ${e}/share/vscode/extensions/* ${vscodeExtsFolderName}/") nixExtsDrvs} + ${lib.concatMapStringsSep "\n" (ePath : '' + if [ ! -d ${ePath.target} ]; then + cp -a ${ePath.origin} ${ePath.target} + chmod -R u+rwx ${ePath.target} + fi + '') mutableExtsPaths} + ''; +in + writeShellScriptBin "code" '' + if ! [[ "$@" =~ "--list-extension" ]]; then + mkdir -p "${vscodeExtsFolderName}" + ${rmExtensions} + ${cpExtensions} + fi + ${vscode}/bin/code --extensions-dir "${vscodeExtsFolderName}" ${ + lib.optionalString (user-data-dir != "") "--user-data-dir ${user-data-dir}" + } "$@" + '' diff --git a/pkgs/applications/editors/vscode/extensions/wakatime/default.nix b/pkgs/applications/editors/vscode/extensions/wakatime/default.nix new file mode 100644 index 00000000000..9832b16f747 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/wakatime/default.nix @@ -0,0 +1,22 @@ +{ lib +, vscode-utils }: + +let + inherit (vscode-utils) buildVscodeMarketplaceExtension; +in + buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-wakatime"; + publisher = "WakaTime"; + version = "17.1.0"; + sha256 = "177q8angrn702pxrrpk1fzggzlnnaymq32v55qpjgjb74rhg4dzw"; + }; + + meta = with lib; { + description = '' + Visual Studio Code plugin for automatic time tracking and metrics generated + from your programming activity + ''; + license = licenses.bsd3; + }; + } diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index cf0e9fc1832..8e2fe29c425 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -257,7 +257,7 @@ , "reveal-md" , "rimraf" , "rollup" -, { "rust-analyzer-build-deps": "../../misc/vscode-extensions/rust-analyzer/build-deps" } +, { "rust-analyzer-build-deps": "../../applications/editors/vscode/extensions/rust-analyzer/build-deps" } , "rtlcss" , "s3http" , "sass" @@ -361,7 +361,7 @@ , "vscode-json-languageserver" , "vscode-json-languageserver-bin" , "vscode-langservers-extracted" -, { "vscode-lldb-build-deps": "../../misc/vscode-extensions/vscode-lldb/build-deps" } +, { "vscode-lldb-build-deps": "../../applications/editors/vscode/extensions/vscode-lldb/build-deps" } , "vue-cli" , "vue-language-server" , "wavedrom-cli" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 8dcdbfeecfd..2217914b856 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -119480,11 +119480,11 @@ in bypassCache = true; reconstructLock = true; }; - "rust-analyzer-build-deps-../../misc/vscode-extensions/rust-analyzer/build-deps" = nodeEnv.buildNodePackage { + "rust-analyzer-build-deps-../../applications/editors/vscode/extensions/rust-analyzer/build-deps" = nodeEnv.buildNodePackage { name = "rust-analyzer"; packageName = "rust-analyzer"; version = "0.2.834"; - src = ../../misc/vscode-extensions/rust-analyzer/build-deps; + src = ../../applications/editors/vscode/extensions/rust-analyzer/build-deps; dependencies = [ sources."@babel/code-frame-7.12.11" sources."@babel/helper-validator-identifier-7.16.7" @@ -130759,11 +130759,11 @@ in bypassCache = true; reconstructLock = true; }; - "vscode-lldb-build-deps-../../misc/vscode-extensions/vscode-lldb/build-deps" = nodeEnv.buildNodePackage { + "vscode-lldb-build-deps-../../applications/editors/vscode/extensions/vscode-lldb/build-deps" = nodeEnv.buildNodePackage { name = "vscode-lldb"; packageName = "vscode-lldb"; version = "1.6.8"; - src = ../../misc/vscode-extensions/vscode-lldb/build-deps; + src = ../../applications/editors/vscode/extensions/vscode-lldb/build-deps; dependencies = [ sources."@discoveryjs/json-ext-0.5.6" sources."@types/eslint-8.4.1" diff --git a/pkgs/misc/vscode-extensions/_maintainers/update-bin-srcs-lib.sh b/pkgs/misc/vscode-extensions/_maintainers/update-bin-srcs-lib.sh deleted file mode 100755 index e3d1e5fb139..00000000000 --- a/pkgs/misc/vscode-extensions/_maintainers/update-bin-srcs-lib.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -prefetchExtensionZip() { - declare publisher="${1?}" - declare name="${2?}" - declare version="${3?}" - - 1>&2 echo - 1>&2 echo "------------- Downloading extension ---------------" - - declare extZipStoreName="${publisher}-${name}.zip" - declare extUrl="https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"; - 1>&2 echo "extUrl='$extUrl'" - declare nixPrefetchArgs=( --name "$extZipStoreName" --print-path "$extUrl" ) - - 1>&2 printf "$ nix-prefetch-url" - 1>&2 printf " %q" "${nixPrefetchArgs[@]}" - 1>&2 printf " 2> /dev/null\n" - declare zipShaWStorePath - zipShaWStorePath=$(nix-prefetch-url "${nixPrefetchArgs[@]}" 2> /dev/null) - - 1>&2 echo "zipShaWStorePath='$zipShaWStorePath'" - echo "$zipShaWStorePath" -} - - -prefetchExtensionUnpacked() { - declare publisher="${1?}" - declare name="${2?}" - declare version="${3?}" - - declare zipShaWStorePath - zipShaWStorePath="$(prefetchExtensionZip "$publisher" "$name" "$version")" - - declare zipStorePath - zipStorePath="$(echo "$zipShaWStorePath" | tail -n1)" - 1>&2 echo "zipStorePath='$zipStorePath'" - - function rm_tmpdir() { - 1>&2 printf "rm -rf -- %q\n" "$tmpDir" - rm -rf -- "$tmpDir" - unset tmpDir - trap - INT TERM HUP EXIT - } - function make_trapped_tmpdir() { - tmpDir=$(mktemp -d) - trap rm_tmpdir INT TERM HUP EXIT - } - - 1>&2 echo - 1>&2 echo "------------- Unpacking extension ---------------" - - make_trapped_tmpdir - declare unzipArgs=( -q -d "$tmpDir" "$zipStorePath" ) - 1>&2 printf "$ unzip" - 1>&2 printf " %q" "${unzipArgs[@]}" - 1>&2 printf "\n" - unzip "${unzipArgs[@]}" - - declare unpackedStoreName="${publisher}-${name}" - - declare unpackedStorePath - unpackedStorePath="$(nix add-to-store -n "$unpackedStoreName" "$tmpDir")" - declare unpackedSha256 - unpackedSha256="$(nix hash-path --base32 --type sha256 "$unpackedStorePath")" - 1>&2 echo "unpackedStorePath='$unpackedStorePath'" - 1>&2 echo "unpackedSha256='$unpackedSha256'" - - rm_tmpdir - - echo "$unpackedSha256" - echo "$unpackedStorePath" -} - - -prefetchExtensionJson() { - declare publisher="${1?}" - declare name="${2?}" - declare version="${3?}" - - declare unpackedShaWStorePath - unpackedShaWStorePath="$(prefetchExtensionUnpacked "$publisher" "$name" "$version")" - - declare unpackedStorePath - unpackedStorePath="$(echo "$unpackedShaWStorePath" | tail -n1)" - 1>&2 echo "unpackedStorePath='$unpackedStorePath'" - - declare jsonShaWStorePath - jsonShaWStorePath=$(nix-prefetch-url --print-path "file://${unpackedStorePath}/extension/package.json" 2> /dev/null) - - 1>&2 echo "jsonShaWStorePath='$jsonShaWStorePath'" - echo "$jsonShaWStorePath" -} - - -formatExtRuntimeDeps() { - declare publisher="${1?}" - declare name="${2?}" - declare version="${3?}" - - declare jsonShaWStorePath - jsonShaWStorePath="$(prefetchExtensionJson "$publisher" "$name" "$version")" - - declare jsonStorePath - jsonStorePath="$(echo "$jsonShaWStorePath" | tail -n1)" - 1>&2 echo "jsonStorePath='$jsonStorePath'" - - # Assume packages without an architectures are for x86_64 and remap arm64 to aarch64. - declare jqQuery - jqQuery=$(cat <<'EOF' -.runtimeDependencies -| map(select(.platforms[] | in({"linux": null, "darwin": null}))) -| map(select(.architectures == null).architectures |= ["x86_64"]) -| map(del(.architectures[] | select(. | in({"x86_64": null, "arm64": null}) | not))) -| map((.architectures[] | select(. == "arm64")) |= "aarch64") -| map(select(.architectures != [])) -| .[] | { - (.id + "__" + (.architectures[0]) + "-" + (.platforms[0])): - {installPath, binaries, urls: [.url, .fallbackUrl] | map(select(. != null))} -} -EOF -) - - 1>&2 printf "$ cat %q | jq '%s'\n" "$jsonStorePath" "$jqQuery" - cat "$jsonStorePath" | jq "$jqQuery" -} - - -computeExtRtDepChecksum() { - declare rtDepJsonObject="${1?}" - declare url - url="$(echo "$rtDepJsonObject" | jq -j '.[].urls[0]')" - declare sha256 - 1>&2 printf "$ nix-prefetch-url '%s'\n" "$url" - sha256="$(nix-prefetch-url "$url")" - 1>&2 echo "$sha256" - echo "$sha256" -} - - -computeAndAttachExtRtDepsChecksums() { - while read -r rtDepJsonObject; do - declare sha256 - sha256="$(computeExtRtDepChecksum "$rtDepJsonObject")" - echo "$rtDepJsonObject" | jq --arg sha256 "$sha256" '.[].sha256 = $sha256' - done < <(cat - | jq -c '.') -} - - -jqStreamToJson() { - cat - | jq --slurp '. | add' -} - - -jsonToNix() { - # TODO: Replacing this non functional stuff with a proper json to nix - # implementation would allow us to produce a 'rt-deps-bin-srcs.nix' file instead. - false - cat - | sed -E -e 's/": /" = /g' -e 's/,$/;/g' -e 's/ }$/ };/g' -e 's/ ]$/ ];/g' -} diff --git a/pkgs/misc/vscode-extensions/cpptools/default.nix b/pkgs/misc/vscode-extensions/cpptools/default.nix deleted file mode 100644 index 077c3807eca..00000000000 --- a/pkgs/misc/vscode-extensions/cpptools/default.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ lib, vscode-utils -, fetchurl, mono, writeScript, runtimeShell -, jq, clang-tools -, gdbUseFixed ? true, gdb # The gdb default setting will be fixed to specified. Use version from `PATH` otherwise. -}: - -/* - Note that this version of the extension still has some nix specific issues - which could not be fixed merely by patching (inside a C# dll). - - In particular, the debugger requires either gnome-terminal or xterm. However - instead of looking for the terminal executable in `PATH`, for any linux platform - the dll uses an hardcoded path to one of these. - - So, in order for debugging to work properly, you merely need to create symlinks - to one of these terminals at the appropriate location. - - The good news is the the utility library is open source and with some effort - we could build a patched version ourselves. See: - - - - Also, the extension should eventually no longer require an external terminal. See: - - - - Once the symbolic link temporary solution taken, everything shoud run smootly. -*/ - -let - gdbDefaultsTo = if gdbUseFixed then "${gdb}/bin/gdb" else "gdb"; - - - openDebugAD7Script = writeScript "OpenDebugAD7" '' - #!${runtimeShell} - BIN_DIR="$(cd "$(dirname "$0")" && pwd -P)" - ${if gdbUseFixed - then '' - export PATH=''${PATH}''${PATH:+:}${gdb}/bin - '' - else ""} - ${mono}/bin/mono $BIN_DIR/bin/OpenDebugAD7.exe $* - ''; -in - -vscode-utils.buildVscodeMarketplaceExtension rec { - mktplcRef = { - name = "cpptools"; - publisher = "ms-vscode"; - version = "1.7.1"; - }; - - vsix = fetchurl { - name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; - url = "https://github.com/microsoft/vscode-cpptools/releases/download/${mktplcRef.version}/cpptools-linux.vsix"; - sha256 = "sha256-LqndG/vv8LgVPEX6dGkikDB6M6ISneo2UJ78izXVFbk="; - }; - - buildInputs = [ - jq - ]; - - postPatch = '' - mv ./package.json ./package_orig.json - - # 1. Add activation events so that the extension is functional. This listing is empty when unpacking the extension but is filled at runtime. - # 2. Patch `package.json` so that nix's *gdb* is used as default value for `miDebuggerPath`. - cat ./package_orig.json | \ - jq --slurpfile actEvts ${./package-activation-events.json} '(.activationEvents) = $actEvts[0]' | \ - jq '(.contributes.debuggers[].configurationAttributes | .attach , .launch | .properties.miDebuggerPath | select(. != null) | select(.default == "/usr/bin/gdb") | .default) = "${gdbDefaultsTo}"' > \ - ./package.json - - # Prevent download/install of extensions - touch "./install.lock" - - # Mono runtimes from nix package (used by generated `OpenDebugAD7`). - mv ./debugAdapters/bin/OpenDebugAD7 ./debugAdapters/bin/OpenDebugAD7_orig - cp -p "${openDebugAD7Script}" "./debugAdapters/bin/OpenDebugAD7" - - # Clang-format from nix package. - mv ./LLVM/ ./LLVM_orig - mkdir "./LLVM/" - find "${clang-tools}" -mindepth 1 -maxdepth 1 | xargs ln -s -t "./LLVM" - - # Patching cpptools and cpptools-srv - elfInterpreter="$(cat $NIX_CC/nix-support/dynamic-linker)" - patchelf --set-interpreter "$elfInterpreter" ./bin/cpptools - patchelf --set-interpreter "$elfInterpreter" ./bin/cpptools-srv - chmod a+x ./bin/cpptools{-srv,} - ''; - - meta = with lib; { - license = licenses.unfree; - maintainers = [ maintainers.jraygauthier ]; - # A 32 bit linux would also be possible with some effort (specific download of binaries + - # patching of the elf files with 32 bit interpreter). - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/misc/vscode-extensions/cpptools/missing_elf_deps.sh b/pkgs/misc/vscode-extensions/cpptools/missing_elf_deps.sh deleted file mode 100755 index f5eb08d78a5..00000000000 --- a/pkgs/misc/vscode-extensions/cpptools/missing_elf_deps.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -p coreutils -i bash - -scriptDir=$(cd "`dirname "$0"`"; pwd) -echo "scriptDir='$scriptDir'" - -function get_pkg_out() { - local pkg="$1" - local suffix="${2:-}" - local nixExp="with (import {}); ${pkg}" - echo "$(nix-build -E "$nixExp" --no-out-link)${suffix}" -} - -interpreter="$(get_pkg_out "stdenv.glibc" "/lib/ld-linux-x86-64.so.2")" -echo "interpreter='$interpreter'" - -# For clangformat dep on 'libtinfo.so.5'. -ncursesLibDir="$(get_pkg_out "ncurses5.out" "/lib")" -echo "ncursesLibDir='$ncursesLibDir'" - -# For clanformat dep on 'libstdc++.so.6'. -stdcppLibDir="$(get_pkg_out "stdenv.cc.cc.lib" "/lib")" -echo "stdcppLibDir='$stdcppLibDir'" - -# For clangformat dep on 'libz.so.1'. -zlibLibDir="$(get_pkg_out "zlib.out" "/lib")" -echo "zlibLibDir='$zlibLibDir'" - -function patchelf_mono() { - local exe="$1" - patchelf --set-interpreter "$interpreter" "$exe" -} - -function patchelf_clangformat() { - local exe="$1" - patchelf --set-interpreter "$interpreter" "$exe" - local rpath="$ncursesLibDir:$stdcppLibDir:$zlibLibDir" - patchelf --set-rpath "$rpath" "$exe" -} - -function print_nix_version_clangtools() { - nixClangToolsBin="$(get_pkg_out "clang-tools" "/bin")" - echo "nixClangToolsBin='$nixClangToolsBin'" - $nixClangToolsBin/clang-format --version -} - -function print_nix_version_mono() { - nixMonoBin="$(get_pkg_out "mono" "/bin")" - echo "nixMonoBin='$nixMonoBin'" - $nixMonoBin/mono --version -} - diff --git a/pkgs/misc/vscode-extensions/cpptools/package-activation-events.json b/pkgs/misc/vscode-extensions/cpptools/package-activation-events.json deleted file mode 100644 index c2d8a10f340..00000000000 --- a/pkgs/misc/vscode-extensions/cpptools/package-activation-events.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - "onLanguage:cpp", - "onLanguage:c", - "onCommand:extension.pickNativeProcess", - "onCommand:extension.pickRemoteNativeProcess", - "onCommand:C_Cpp.ConfigurationEdit", - "onCommand:C_Cpp.ConfigurationSelect", - "onCommand:C_Cpp.ConfigurationProviderSelect", - "onCommand:C_Cpp.SwitchHeaderSource", - "onCommand:C_Cpp.Navigate", - "onCommand:C_Cpp.GoToDeclaration", - "onCommand:C_Cpp.PeekDeclaration", - "onCommand:C_Cpp.ToggleErrorSquiggles", - "onCommand:C_Cpp.ToggleIncludeFallback", - "onCommand:C_Cpp.ToggleDimInactiveRegions", - "onCommand:C_Cpp.ToggleSnippets", - "onCommand:C_Cpp.ShowReleaseNotes", - "onCommand:C_Cpp.ResetDatabase", - "onCommand:C_Cpp.PauseParsing", - "onCommand:C_Cpp.ResumeParsing", - "onCommand:C_Cpp.ShowParsingCommands", - "onCommand:C_Cpp.TakeSurvey", - "onDebug", - "workspaceContains:/.vscode/c_cpp_properties.json" -] diff --git a/pkgs/misc/vscode-extensions/cpptools/update_helper.sh b/pkgs/misc/vscode-extensions/cpptools/update_helper.sh deleted file mode 100755 index 00ef7755324..00000000000 --- a/pkgs/misc/vscode-extensions/cpptools/update_helper.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -p coreutils -p jq -p unzip -i bash -set -euo pipefail - -# -# A little script to help maintaining this package. It will: -# -# - download the specified version of the extension to the store and print its url, packed store path and hash -# - unpack the extension, bring it to the store and print its store path and hash -# - fetch its runtimes dependencies from the 'package.json' file using the 'jq' utility, unpack those to the store -# and print its url store path and hash -# - patch elf of the binaries that got a nix replacement -# - bring the patched version to the store -# - run their '--version' and call 'ldd' -# - print the version of the runtime deps nix replacements. -# -# TODO: Print to a properly formated nix file all the required information to fetch everything (extension + runtime deps). -# TODO: Print x86 and maybe darwin runtime dependencies. -# - -scriptDir=$(cd "`dirname "$0"`"; pwd) -echo "scriptDir='$scriptDir'" - -extPublisher="vscode" -extName="cpptools" -defaultExtVersion="0.16.1" -extVersion="${1:-$defaultExtVersion}" - -echo -echo "------------- Downloading extension ---------------" - -extZipStoreName="${extPublisher}-${extName}.zip" -extUrl="https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/cpptools/${extVersion}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" -echo "extUrl='$extUrl'" -storePathWithSha=$(nix-prefetch-url --name "$extZipStoreName" --print-path "$extUrl" 2> /dev/null) - -cpptoolsZipStorePath="$(echo "$storePathWithSha" | tail -n1)" -cpptoolsZipSha256="$(echo "$storePathWithSha" | head -n1)" -echo "cpptoolsZipStorePath='$cpptoolsZipStorePath'" -echo "cpptoolsZipSha256='$cpptoolsZipSha256'" - - -extStoreName="${extPublisher}-${extName}" - - -function rm_tmpdir() { - #echo "Removing \`tmpDir='$tmpDir'\`" - rm -rf -- "$tmpDir" - unset tmpDir - trap - INT TERM HUP EXIT -} -function make_trapped_tmpdir() { - tmpDir=$(mktemp -d) - trap rm_tmpdir INT TERM HUP EXIT -} - -echo -echo "------------- Unpacked extension ---------------" - -make_trapped_tmpdir -unzip -q -d "$tmpDir" "$cpptoolsZipStorePath" - -cpptoolsStorePath="$(nix add-to-store -n "$extStoreName" "$tmpDir")" -cpptoolsSha256="$(nix hash-path --base32 --type sha512 "$cpptoolsStorePath")" -echo "cpptoolsStorePath='$cpptoolsStorePath'" -echo "cpptoolsSha256='$cpptoolsSha256'" - -rm_tmpdir - -storePathWithSha=$(nix-prefetch-url --print-path "file://${cpptoolsStorePath}/extension/package.json" 2> /dev/null) - -extPackageJSONStorePath="$(echo "$storePathWithSha" | tail -n1)" -extPackageJSONSha256="$(echo "$storePathWithSha" | head -n1)" -echo "extPackageJSONStorePath='$extPackageJSONStorePath'" -echo "extPackageJSONSha256='$extPackageJSONSha256'" - -print_runtime_dep() { - - local outName="$1" - local extPackageJSONStorePath="$2" - local depDesc="$3" - - local urlRaw=$(cat "$extPackageJSONStorePath" | jq -r --arg desc "$depDesc" '.runtimeDependencies[] | select(.description == $desc) | .url') - local url=$(echo $urlRaw | xargs curl -Ls -o /dev/null -w %{url_effective}) - - local urlRawVarStr="${outName}_urlRaw='$urlRaw'" - local urlVarStr="${outName}_url='$url'" - echo "$urlRawVarStr" - echo "$urlVarStr" - - local storePathWithSha="$(nix-prefetch-url --unpack --print-path "$url" 2> /dev/null)" - - local storePath="$(echo "$storePathWithSha" | tail -n1)" - local sha256="$(echo "$storePathWithSha" | head -n1)" - - local sha256VarStr="${outName}_sha256='$sha256'" - local storePathVarStr="${outName}_storePath='$storePath'" - echo "$sha256VarStr" - echo "$storePathVarStr" - - eval "$urlRawVarStr" - eval "$urlVarStr" - eval "$sha256VarStr" - eval "$storePathVarStr" -} - -echo -echo "------------- Runtime dependencies ---------------" - -print_runtime_dep "langComponentBinaries" "$extPackageJSONStorePath" "C/C++ language components (Linux / x86_64)" -print_runtime_dep "monoRuntimeBinaries" "$extPackageJSONStorePath" "Mono Runtime (Linux / x86_64)" -print_runtime_dep "clanFormatBinaries" "$extPackageJSONStorePath" "ClangFormat (Linux / x86_64)" - - -echo -echo "------------- Runtime deps missing elf deps ---------------" - -source "$scriptDir/missing_elf_deps.sh" - -echo -echo "------------- Runtime dep mono ---------------" - -make_trapped_tmpdir -find "$monoRuntimeBinaries_storePath" -mindepth 1 -maxdepth 1 | xargs -d '\n' cp -rp -t "$tmpDir" -chmod -R a+rwx "$tmpDir" - -ls -la "$tmpDir/debugAdapters" - -patchelf_mono "$tmpDir/debugAdapters/mono.linux-x86_64" - -chmod a+x "$tmpDir/debugAdapters/mono.linux-x86_64" -ldd "$tmpDir/debugAdapters/mono.linux-x86_64" -"$tmpDir/debugAdapters/mono.linux-x86_64" --version - -monoRuntimeBinariesPatched_storePath="$(nix add-to-store -n "monoRuntimeBinariesPatched" "$tmpDir")" -echo "monoRuntimeBinariesPatched_storePath='$monoRuntimeBinariesPatched_storePath'" - -rm_tmpdir - - -echo -echo "------------- Runtime dep clang ---------------" -make_trapped_tmpdir -find "$clanFormatBinaries_storePath" -mindepth 1 -maxdepth 1 | xargs -d '\n' cp -rp -t "$tmpDir" -chmod -R a+rwx "$tmpDir" - -ls -la "$tmpDir/bin" - -patchelf_clangformat "$tmpDir/bin/clang-format" - -chmod a+x "$tmpDir/bin/clang-format" -ldd "$tmpDir/bin/clang-format" -"$tmpDir/bin/clang-format" --version - - -clanFormatBinariesPatched_storePath="$(nix add-to-store -n "clanFormatBinariesPatched" "$tmpDir")" -echo "clanFormatBinariesPatched_storePath='$clanFormatBinariesPatched_storePath'" - -rm_tmpdir - -echo -echo "------------- Nix mono ---------------" -print_nix_version_clangtools - -echo -echo "------------- Nix mono ---------------" -print_nix_version_mono - diff --git a/pkgs/misc/vscode-extensions/default.nix b/pkgs/misc/vscode-extensions/default.nix deleted file mode 100644 index 3e5bf42dd95..00000000000 --- a/pkgs/misc/vscode-extensions/default.nix +++ /dev/null @@ -1,2213 +0,0 @@ -{ config -, lib -, fetchurl -, callPackage -, vscode-utils -, asciidoctor -, nodePackages -, jdk -, llvmPackages_8 -, nixpkgs-fmt -, protobuf -, jq -, shellcheck -, moreutils -, racket-minimal -, clojure-lsp -, alejandra -}: - -let - inherit (vscode-utils) buildVscodeMarketplaceExtension; - - # - # Unless there is a good reason not to, we attempt to use the same name as the - # extension's unique identifier (the name the extension gets when installed - # from vscode under `~/.vscode`) and found on the marketplace extension page. - # So an extension's attribute name should be of the form: - # "${mktplcRef.publisher}.${mktplcRef.name}". - # - baseExtensions = self: lib.mapAttrs (_n: lib.recurseIntoAttrs) - { - _4ops.terraform = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "4ops"; - name = "terraform"; - version = "0.2.1"; - sha256 = "196026a89pizj8p0hqdgkyllj2spx2qwpynsaqjq17s8v15vk5dg"; - }; - meta = { - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ kamadorueda ]; - }; - }; - - a5huynh.vscode-ron = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-ron"; - publisher = "a5huynh"; - version = "0.9.0"; - sha256 = "0d3p50mhqp550fmj662d3xklj14gvzvhszm2hlqvx4h28v222z97"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - alanz.vscode-hie-server = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-hie-server"; - publisher = "alanz"; - version = "0.0.27"; # see the note above - sha256 = "1mz0h5zd295i73hbji9ivla8hx02i4yhqcv6l4r23w3f07ql3i8h"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - alefragnani.project-manager = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "project-manager"; - publisher = "alefragnani"; - version = "12.1.0"; - sha256 = "sha256-fYBKmWn9pJh2V0fGdqVrXj9zIl8oTrZcBycDaMOXL/8="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - alexdima.copy-relative-path = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "copy-relative-path"; - publisher = "alexdima"; - version = "0.0.2"; - sha256 = "06g601n9d6wyyiz659w60phgm011gn9jj5fy0gf5wpi2bljk3vcn"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - alygin.vscode-tlaplus = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-tlaplus"; - publisher = "alygin"; - version = "1.5.4"; - sha256 = "0mf98244z6wzb0vj6qdm3idgr2sr5086x7ss2khaxlrziif395dx"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - angular.ng-template = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "ng-template"; - publisher = "Angular"; - version = "12.2.0"; - sha256 = "sha256-CChkWKiLi/OcOm268d45pNwiyrKhztqYsQvJV/9z+Ag="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/Angular.ng-template/changelog"; - description = "Editor services for Angular templates"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=Angular.ng-template"; - homepage = "https://github.com/angular/vscode-ng-language-service"; - license = licenses.mit; - maintainers = with maintainers; [ ratsclub ]; - }; - }; - - antfu = { - icons-carbon = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "icons-carbon"; - publisher = "antfu"; - version = "0.2.2"; - sha256 = "0mfap16la09mn0jhvy8s3dainrmjz64vra7d0d4fbcpgg420kv3f"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - slidev = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "antfu"; - name = "slidev"; - version = "0.3.3"; - sha256 = "0pqiwcvn5c8kwqlmz4ribwwra69gbiqvz41ig4fh29hkyh078rfk"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - }; - - antyos.openscad = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "openscad"; - publisher = "Antyos"; - version = "1.1.1"; - sha256 = "1adcw9jj3npk3l6lnlfgji2l529c4s5xp9jl748r9naiy3w3dpjv"; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/Antyos.openscad/changelog"; - description = "OpenSCAD highlighting, snippets, and more for VSCode"; - homepage = "https://github.com/Antyos/vscode-openscad"; - license = licenses.gpl3; - }; - }; - - apollographql.vscode-apollo = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-apollo"; - publisher = "apollographql"; - version = "1.19.9"; - sha256 = "sha256-iJpzNKcuQrfq4Z0LXuadt6OKXelBbDQg/vuc7NJ2I5o="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/apollographql.vscode-apollo/changelog"; - description = "Rich editor support for GraphQL client and server development that seamlessly integrates with the Apollo platform"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo"; - homepage = "https://github.com/apollographql/vscode-graphql"; - license = licenses.mit; - maintainers = with maintainers; [ datafoo ]; - }; - }; - - arcticicestudio.nord-visual-studio-code = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "nord-visual-studio-code"; - publisher = "arcticicestudio"; - version = "0.18.0"; - sha256 = "sha256-Uo6peR+2ZNX6nwJ0Yar32Pe0rfBZ+f6ef1cYhUvVUbE="; - }; - meta = with lib; { - description = "An arctic, north-bluish clean and elegant Visual Studio Code theme."; - downloadPage = - "https://marketplace.visualstudio.com/items?itemName=arcticicestudio.nord-visual-studio-code"; - homepage = "https://github.com/arcticicestudio/nord-visual-studio-code"; - license = licenses.mit; - maintainers = with maintainers; [ imgabe ]; - }; - }; - - Arjun.swagger-viewer = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "Arjun"; - name = "swagger-viewer"; - version = "3.1.2"; - sha256 = "1cjvc99x1q5w3i2vnbxrsl5a1dr9gb3s6s9lnwn6mq5db6iz1nlm"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - arrterian.nix-env-selector = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "nix-env-selector"; - publisher = "arrterian"; - version = "1.0.7"; - sha256 = "0e76885c9dbb6dca4eac8a75866ec372b948cc64a3a3845327d7c3ef6ba42a57"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - asciidoctor.asciidoctor-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "asciidoctor-vscode"; - publisher = "asciidoctor"; - version = "2.8.9"; - sha256 = "1xkxx5i3nhd0dzqhhdmx0li5jifsgfhv0p5h7xwsscz3gzgsdcyb"; - }; - - postPatch = '' - substituteInPlace dist/src/text-parser.js \ - --replace "get('asciidoctor_command', 'asciidoctor')" \ - "get('asciidoctor_command', '${asciidoctor}/bin/asciidoctor')" - substituteInPlace dist/src/commands/exportAsPDF.js \ - --replace "get('asciidoctorpdf_command', 'asciidoctor-pdf')" \ - "get('asciidoctorpdf_command', '${asciidoctor}/bin/asciidoctor-pdf')" - ''; - - meta = with lib; { - license = licenses.mit; - }; - }; - - asvetliakov.vscode-neovim = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-neovim"; - publisher = "asvetliakov"; - version = "0.0.83"; - sha256 = "1giybf12p0h0fm950w9bwvzdk77771zfkylrqs9h0lhbdzr92qbl"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - ms-python.vscode-pylance = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-pylance"; - publisher = "MS-python"; - version = "2022.1.5"; - sha256 = "1b5ihrac9xsq35a39vlq7krr1ffqpdjxdlhv9s056hs033kayazl"; - }; - - buildInputs = [ nodePackages.pyright ]; - - meta = { - license = lib.licenses.unfree; - }; - }; - - b4dm4n.vscode-nixpkgs-fmt = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "nixpkgs-fmt"; - publisher = "B4dM4n"; - version = "0.0.1"; - sha256 = "sha256-vz2kU36B1xkLci2QwLpl/SBEhfSWltIDJ1r7SorHcr8="; - }; - nativeBuildInputs = [ jq moreutils ]; - postInstall = '' - cd "$out/$installPrefix" - jq '.contributes.configuration.properties."nixpkgs-fmt.path".default = "${nixpkgs-fmt}/bin/nixpkgs-fmt"' package.json | sponge package.json - ''; - meta = with lib; { - license = licenses.mit; - }; - }; - - baccata.scaladex-search = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "scaladex-search"; - publisher = "baccata"; - version = "0.2.0"; - sha256 = "0xbikwlrascmn9nzyl4fxb2ql1dczd00ragp30a3yv8bax173bnz"; - }; - meta = { - license = lib.licenses.asl20; - }; - }; - - bbenoist.nix = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "Nix"; - publisher = "bbenoist"; - version = "1.0.1"; - sha256 = "0zd0n9f5z1f0ckzfjr38xw2zzmcxg1gjrava7yahg5cvdcw6l35b"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - benfradet.vscode-unison = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-unison"; - publisher = "benfradet"; - version = "0.3.0"; - sha256 = "1x80s8l8djchg17553aiwaf4b49hf6awiayk49wyii0i26hlpjk1"; - }; - meta = with lib; { - license = licenses.asl20; - }; - }; - - betterthantomorrow.calva = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "calva"; - publisher = "betterthantomorrow"; - version = "2.0.205"; - sha256 = "sha256-umnG1uLB42fUNKjANaKcABjVmqbdOQakd/6TPsEpF9c"; - }; - nativeBuildInputs = [ jq moreutils ]; - postInstall = '' - cd "$out/$installPrefix" - jq '.contributes.configuration[0].properties."calva.clojureLspPath".default = "${clojure-lsp}/bin/clojure-lsp"' package.json | sponge package.json - ''; - meta = with lib; { - license = licenses.mit; - }; - }; - - bodil.file-browser = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "file-browser"; - publisher = "bodil"; - version = "0.2.10"; - sha256 = "sha256-RW4vm0Hum9AeN4Rq7MSJOIHnALU0L1tBLKjaRLA2hL8="; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - bradlc.vscode-tailwindcss = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-tailwindcss"; - publisher = "bradlc"; - version = "0.6.13"; - sha256 = "098vrm28b7jpzk0c2d0cgxvdw4jsswzf18cx1m9jwsm1j40fp5f4"; - }; - meta = with lib; { - license = licenses.mpl20; - }; - }; - - brettm12345.nixfmt-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "nixfmt-vscode"; - publisher = "brettm12345"; - version = "0.0.1"; - sha256 = "07w35c69vk1l6vipnq3qfack36qcszqxn8j3v332bl0w6m02aa7k"; - }; - meta = with lib; { - license = licenses.mpl20; - }; - }; - - bungcip.better-toml = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "better-toml"; - publisher = "bungcip"; - version = "0.3.2"; - sha256 = "sha256-g+LfgjAnSuSj/nSmlPdB0t29kqTmegZB5B1cYzP8kCI="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/bungcip.better-toml/changelog"; - description = "Better TOML Language support"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=bungcip.better-toml"; - homepage = "https://github.com/bungcip/better-toml/blob/master/README.md"; - license = licenses.mit; - maintainers = with maintainers; [ datafoo ]; - }; - }; - - chenglou92.rescript-vscode = callPackage ./rescript { }; - - christian-kohler.path-intellisense = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "path-intellisense"; - publisher = "christian-kohler"; - version = "2.6.1"; - sha256 = "sha256-ol98g3pliBlyEQ+n7cR4O04J/0QB9U8+fvf+FC0j0Fc="; - }; - meta = with lib; { - description = "Visual Studio Code plugin that autocompletes filenames"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense"; - homepage = "https://github.com/ChristianKohler/PathIntellisense"; - license = licenses.mit; - maintainers = with maintainers; [ imgabe ]; - }; - }; - - cmschuetz12.wal = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "wal"; - publisher = "cmschuetz12"; - version = "0.1.0"; - sha256 = "0q089jnzqzhjfnv0vlb5kf747s3mgz64r7q3zscl66zb2pz5q4zd"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - codezombiech.gitignore = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "gitignore"; - publisher = "codezombiech"; - version = "0.7.0"; - sha256 = "0fm4sxx1cb679vn4v85dw8dfp5x0p74m9p2b56gqkvdap0f2q351"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - coenraads.bracket-pair-colorizer = buildVscodeMarketplaceExtension { - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/CoenraadS.bracket-pair-colorizer/changelog"; - description = "A customizable extension for colorizing matching brackets"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer"; - homepage = "https://github.com/CoenraadS/BracketPair"; - license = licenses.mit; - maintainers = with maintainers; [ ]; - }; - mktplcRef = { - name = "bracket-pair-colorizer"; - publisher = "CoenraadS"; - version = "1.0.61"; - sha256 = "0r3bfp8kvhf9zpbiil7acx7zain26grk133f0r0syxqgml12i652"; - }; - }; - - coenraads.bracket-pair-colorizer-2 = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "bracket-pair-colorizer-2"; - publisher = "CoenraadS"; - version = "0.2.2"; - sha256 = "0zcbs7h801agfs2cggk1cz8m8j0i2ypmgznkgw17lcx3zisll9ad"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - coolbear.systemd-unit-file = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "coolbear"; - name = "systemd-unit-file"; - version = "1.0.6"; - sha256 = "0sc0zsdnxi4wfdlmaqwb6k2qc21dgwx6ipvri36x7agk7m8m4736"; - }; - meta = { - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ kamadorueda ]; - }; - }; - - cweijan.vscode-database-client2 = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-database-client2"; - publisher = "cweijan"; - version = "4.3.3"; - sha256 = "06bj23y5rbpz0lw45p1sxssalgn19iqfqbijw2ym22grm0i9hcby"; - }; - meta = { - description = "Database Client For Visual Studio Code"; - homepage = "https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2"; - license = lib.licenses.mit; - }; - }; - - dbaeumer.vscode-eslint = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-eslint"; - publisher = "dbaeumer"; - version = "2.2.2"; - sha256 = "sha256-llalyQXl+k/ugZq+Ti9mApHRqAGu6QyoMP51GtZnRJ4="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - davidanson.vscode-markdownlint = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-markdownlint"; - publisher = "DavidAnson"; - version = "0.46.0"; - sha256 = "sha256-2FvE+6fnZPtR0At4NjLKSMCbPu8T7o8xtpvYiEjh7ck="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint/changelog"; - description = "Markdown linting and style checking for Visual Studio Code"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint"; - homepage = "https://github.com/DavidAnson/vscode-markdownlint"; - license = licenses.mit; - maintainers = with maintainers; [ datafoo ]; - }; - }; - - davidlday.languagetool-linter = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "languagetool-linter"; - publisher = "davidlday"; - version = "0.19.0"; - sha256 = "sha256-crq6CTXpzwHJL8FPIBneAGjDgUUNdpBt6rIaMCr1F1U="; - }; - meta = with lib; { - description = "LanguageTool integration for VS Code"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=davidlday.languagetool-linter"; - homepage = "https://github.com/davidlday/vscode-languagetool-linter"; - license = licenses.asl20; - maintainers = with maintainers; [ ebbertd ]; - }; - }; - - denoland.vscode-deno = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-deno"; - publisher = "denoland"; - version = "3.9.1"; - sha256 = "sha256-OuGTjmJQFAWrYp7YnFpyo0NnnCcXYF8itYjGKMa3FCs="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/denoland.vscode-deno/changelog"; - description = "A language server client for Deno"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno"; - homepage = "https://github.com/denoland/vscode_deno"; - license = licenses.mit; - maintainers = with maintainers; [ ratsclub ]; - }; - }; - - dhall.dhall-lang = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "dhall-lang"; - publisher = "dhall"; - version = "0.0.4"; - sha256 = "0sa04srhqmngmw71slnrapi2xay0arj42j4gkan8i11n7bfi1xpf"; - }; - meta = { license = lib.licenses.mit; }; - }; - - dhall.vscode-dhall-lsp-server = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-dhall-lsp-server"; - publisher = "dhall"; - version = "0.0.4"; - sha256 = "1zin7s827bpf9yvzpxpr5n6mv0b5rhh3civsqzmj52mdq365d2js"; - }; - meta = { license = lib.licenses.mit; }; - }; - - disneystreaming.smithy = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "disneystreaming"; - name = "smithy"; - version = "0.0.2"; - sha256 = "0rdh7b5s7ynsyfrq1r1170g65q9vvvfl3qbfvbh1b38ndvj2f0yq"; - }; - meta = { license = lib.licenses.asl20; }; - }; - - divyanshuagrawal.competitive-programming-helper = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "competitive-programming-helper"; - publisher = "DivyanshuAgrawal"; - version = "5.8.5"; - sha256 = "25v2tdAX7fVl2B5nvOIKN9vP1G5rA0G67CiDQn9n9Uc="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/DivyanshuAgrawal.competitive-programming-helper/changelog"; - description = "Makes judging, compiling, and downloading problems for competitve programming easy. Also supports auto-submit for a few sites."; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=DivyanshuAgrawal.competitive-programming-helper"; - homepage = "https://github.com/agrawal-d/cph"; - license = licenses.gpl3; - maintainers = with maintainers; [ arcticlimer ]; - }; - }; - - donjayamanne.githistory = buildVscodeMarketplaceExtension { - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/donjayamanne.githistory/changelog"; - description = "View git log, file history, compare branches or commits"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory"; - homepage = "https://github.com/DonJayamanne/gitHistoryVSCode/"; - license = licenses.mit; - maintainers = with maintainers; [ ]; - }; - mktplcRef = { - name = "githistory"; - publisher = "donjayamanne"; - version = "0.6.14"; - sha256 = "11x116hzqnhgbryp2kqpki1z5mlnwxb0ly9r1513m5vgbisrsn0i"; - }; - }; - - dotjoshjohnson.xml = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "xml"; - publisher = "dotjoshjohnson"; - version = "2.5.1"; - sha256 = "1v4x6yhzny1f8f4jzm4g7vqmqg5bqchyx4n25mkgvw2xp6yls037"; - }; - meta = { - description = "XML Tools"; - homepage = "https://github.com/DotJoshJohnson/vscode-xml"; - license = lib.licenses.mit; - }; - }; - - dracula-theme.theme-dracula = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "theme-dracula"; - publisher = "dracula-theme"; - version = "2.22.3"; - sha256 = "0wni9sriin54ci8rly2s68lkfx8rj1cys6mgcizvps9sam6377w6"; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/dracula-theme.theme-dracula/changelog"; - description = "Dark theme for many editors, shells, and more"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=dracula-theme.theme-dracula"; - homepage = "https://draculatheme.com/"; - license = licenses.mit; - }; - }; - - eamodio.gitlens = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "gitlens"; - publisher = "eamodio"; - version = "11.7.0"; - sha256 = "0apjjlfdwljqih394ggz2d8m599pyyjrb0b4cfcz83601b7hk3x6"; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/eamodio.gitlens/changelog"; - description = "GitLens supercharges the Git capabilities built into Visual Studio Code."; - longDescription = '' - Supercharge the Git capabilities built into Visual Studio Code — Visualize code authorship at a glance via Git - blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via - powerful comparison commands, and so much more - ''; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"; - homepage = "https://gitlens.amod.io/"; - license = licenses.mit; - maintainers = with maintainers; [ ratsclub ]; - }; - }; - - editorconfig.editorconfig = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "EditorConfig"; - publisher = "EditorConfig"; - version = "0.16.4"; - sha256 = "0fa4h9hk1xq6j3zfxvf483sbb4bd17fjl5cdm3rll7z9kaigdqwg"; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/EditorConfig.EditorConfig/changelog"; - description = "EditorConfig Support for Visual Studio Code"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig"; - homepage = "https://github.com/editorconfig/editorconfig-vscode"; - license = licenses.mit; - maintainers = with maintainers; [ dbirks ]; - }; - }; - - edonet.vscode-command-runner = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-command-runner"; - publisher = "edonet"; - version = "0.0.122"; - sha256 = "1lvwvcs18azqhkzyvhf83ckfhfdgcqrw2gxb2myspqj59783hfpg"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - eg2.vscode-npm-script = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-npm-script"; - publisher = "eg2"; - version = "0.3.24"; - sha256 = "sha256-XgdMLecyZQXsgQAUh8V4eFLKaUF4WVlgy9iIGNDnR/I="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - elmtooling.elm-ls-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "elm-ls-vscode"; - publisher = "Elmtooling"; - version = "2.4.0"; - sha256 = "sha256-5hYlkx8hlwS8iWTlfupX8XjTLAY/KUi0bd3jf/tm92o="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/Elmtooling.elm-ls-vscode/changelog"; - description = "Elm language server"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=Elmtooling.elm-ls-vscode"; - homepage = "https://github.com/elm-tooling/elm-language-client-vscode"; - license = licenses.mit; - maintainers = with maintainers; [ mcwitt ]; - }; - }; - - emmanuelbeziat.vscode-great-icons = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-great-icons"; - publisher = "emmanuelbeziat"; - version = "2.1.79"; - sha256 = "1cr1pxgxlfr643sfxbcr2xd53s1dnzcpacjj0ffkgizfda2psy78"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - esbenp.prettier-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "prettier-vscode"; - publisher = "esbenp"; - version = "9.2.0"; - sha256 = "sha256-ROI312MPMUY1q6IV4qVCW8DD0MQPA/hVW7rfamo/IbI="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/esbenp.prettier-vscode/changelog"; - description = "Code formatter using prettier"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"; - homepage = "https://github.com/prettier/prettier-vscode"; - license = licenses.mit; - maintainers = with maintainers; [ datafoo ]; - }; - }; - - ethansk.restore-terminals = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "restore-terminals"; - publisher = "ethansk"; - version = "1.1.6"; - sha256 = "sha256-XCgxphXIJ/y85IR/qEQhGsbnqWFRWvbyIDchnVTUqMg="; - }; - }; - - eugleo.magic-racket = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "magic-racket"; - publisher = "evzen-wybitul"; - version = "0.5.7"; - sha256 = "sha256-34/H0WgM73yzuOGU2w6Ipq7KuEBuN1bykcLGuvzY3mU="; - }; - nativeBuildInputs = [ jq moreutils ]; - postInstall = '' - cd "$out/$installPrefix" - jq '.contributes.configuration.properties."magic-racket.general.racketPath".default = "${racket-minimal}/bin/racket"' package.json | sponge package.json - ''; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/evzen-wybitul.magic-racket/changelog"; - description = "The best coding experience for Racket in VS Code "; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=evzen-wybitul.magic-racket"; - homepage = "https://github.com/Eugleo/magic-racket"; - license = licenses.agpl3Only; - }; - }; - - faustinoaq.lex-flex-yacc-bison = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "lex-flex-yacc-bison"; - publisher = "faustinoaq"; - version = "0.0.3"; - sha256 = "6254f52157dc796eae7bf135ac88c1c9cc19d884625331a1e634f9768722cc3d"; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/faustinoaq.lex-flex-yacc-bison/changelog"; - description = "Language support for Lex, Flex, Yacc and Bison."; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=faustinoaq.lex-flex-yacc-bison"; - homepage = "https://github.com/faustinoaq/vscode-lex-flex-yacc-bison"; - license = licenses.mit; - maintainers = with maintainers; [ emilytrau ]; - }; - }; - - file-icons.file-icons = buildVscodeMarketplaceExtension { - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/file-icons.file-icons/changelog"; - description = "File-specific icons in VSCode for improved visual grepping."; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=file-icons.file-icons"; - homepage = "https://github.com/file-icons/vscode"; - license = licenses.mit; - maintainers = with maintainers; [ ]; - }; - mktplcRef = { - name = "file-icons"; - publisher = "file-icons"; - version = "1.0.28"; - sha256 = "1lyx0l42xhi2f3rdnjddc3mw7m913kjnchawi98i6vqsx3dv7091"; - }; - }; - - foam.foam-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "foam-vscode"; - publisher = "foam"; - version = "0.14.1"; - sha256 = "sha256-w9xGkezS3A9z6sTk8WWgW7g8qYX6mJFfRV0lv5cu160="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/foam.foam-vscode/changelog"; - description = "A personal knowledge management and sharing system for VSCode "; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=foam.foam-vscode"; - homepage = "https://foambubble.github.io/"; - license = licenses.mit; - maintainers = with maintainers; [ ratsclub ]; - }; - }; - - formulahendry.auto-close-tag = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "auto-close-tag"; - publisher = "formulahendry"; - version = "0.5.13"; - sha256 = "0swyxhcibv6cl54gmfpnbz6bqidjzc77nx369wndhlq264idnwkw"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - formulahendry.auto-rename-tag = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "auto-rename-tag"; - publisher = "formulahendry"; - version = "0.1.9"; - sha256 = "1xk8rzda16qgdxhq8bz6f8w09fd9044qczx1wfhszd6w3r4q9262"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - formulahendry.code-runner = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "code-runner"; - publisher = "formulahendry"; - version = "0.11.2"; - sha256 = "0qwcxr6m1xwhqmdl4pccjgpikpq1hgi2hgrva5abn8ixa2510hcy"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - foxundermoon.shell-format = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "shell-format"; - publisher = "foxundermoon"; - version = "7.1.0"; - sha256 = "09z72mdr5bfdcb67xyzlv7lb9vyjlc3k9ackj4jgixfk40c68cnj"; - }; - meta = with lib; { - downloadPage = "https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format"; - homepage = "https://github.com/foxundermoon/vs-shell-format"; - license = licenses.mit; - maintainers = with maintainers; [ dbirks ]; - }; - }; - - freebroccolo.reasonml = buildVscodeMarketplaceExtension { - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/freebroccolo.reasonml/changelog"; - description = "Reason support for Visual Studio Code"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=freebroccolo.reasonml"; - homepage = "https://github.com/reasonml-editor/vscode-reasonml"; - license = licenses.asl20; - maintainers = with maintainers; [ ]; - }; - mktplcRef = { - name = "reasonml"; - publisher = "freebroccolo"; - version = "1.0.38"; - sha256 = "1nay6qs9vcxd85ra4bv93gg3aqg3r2wmcnqmcsy9n8pg1ds1vngd"; - }; - }; - - humao.rest-client = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "humao"; - name = "rest-client"; - version = "0.24.6"; - sha256 = "196pm7gv0488bpv1lklh8hpwmdqc4yimz389gad6nsna368m4m43"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - jkillian.custom-local-formatters = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "jkillian"; - name = "custom-local-formatters"; - version = "0.0.4"; - sha256 = "1pmqnc759fq86g2z3scx5xqpni9khcqi5z2kpl1kb7yygsv314gm"; - }; - meta = { - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ kamadorueda ]; - }; - }; - - kamikillerto.vscode-colorize = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-colorize"; - publisher = "kamikillerto"; - version = "0.11.1"; - sha256 = "1h82b1jz86k2qznprng5066afinkrd7j3738a56idqr3vvvqnbsm"; - }; - meta = { - license = lib.licenses.asl20; - }; - }; - - github = { - copilot = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "github"; - name = "copilot"; - version = "1.7.4812"; - sha256 = "1yl7m90m38pv8nz4dwcszjsa1sf253459xln17mngmc8z9wd3d3a"; - }; - meta = { license = lib.licenses.unfree; }; - }; - - github-vscode-theme = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "github-vscode-theme"; - publisher = "github"; - version = "4.1.1"; - sha256 = "14wz2b0bn1rnmpj28c0mivz2gacla2dgg8ncv7qfx9bsxhf95g68"; - }; - meta = with lib; { - description = "GitHub theme for VS Code"; - downloadPage = - "https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme"; - homepage = "https://github.com/primer/github-vscode-theme"; - license = licenses.mit; - maintainers = with maintainers; [ hugolgst ]; - }; - }; - - vscode-pull-request-github = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-pull-request-github"; - publisher = "github"; - version = "0.35.2022010609"; - sha256 = "06ryx8b605fd1q2zz8jps7j8r506qwym93x1ra1kc0h9g8a8r7sa"; - }; - meta = { license = lib.licenses.mit; }; - }; - }; - - golang.go = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "Go"; - publisher = "golang"; - version = "0.25.1"; - sha256 = "sha256-ZDUWN9lzDnR77W7xcMFQaaFl/6Lf/x1jgaBkwZPqGGw="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - graphql.vscode-graphql = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-graphql"; - publisher = "GraphQL"; - version = "0.3.50"; - sha256 = "1yf6v2vsgmq86ysb6vxzbg2gh6vz03fsz0d0rhpvpghayrjlk5az"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - gruntfuggly.todo-tree = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "todo-tree"; - publisher = "Gruntfuggly"; - version = "0.0.215"; - sha256 = "sha256-WK9J6TvmMCLoqeKWh5FVp1mNAXPWVmRvi/iFuLWMylM="; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - haskell.haskell = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "haskell"; - publisher = "haskell"; - version = "1.8.0"; - sha256 = "sha256-+k8XT2COe9Z8HvZvcrzfVuocRcxXBrVoNHDT/uKK7Hs="; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - hashicorp.terraform = callPackage ./terraform { }; - - hookyqr.beautify = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "beautify"; - publisher = "HookyQR"; - version = "1.5.0"; - sha256 = "1c0kfavdwgwham92xrh0gnyxkrl9qlkpv39l1yhrldn8vd10fj5i"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - ibm.output-colorizer = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "output-colorizer"; - publisher = "IBM"; - version = "0.1.2"; - sha256 = "0i9kpnlk3naycc7k8gmcxas3s06d67wxr3nnyv5hxmsnsx5sfvb7"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - iciclesoft.workspacesort = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "workspacesort"; - publisher = "iciclesoft"; - version = "1.6.0"; - sha256 = "1pbk8kflywll6lqhmffz9yjf01dn8xq8sk6rglnfn2kl2ildfhh6"; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/iciclesoft.workspacesort/changelog"; - description = "Sort workspace-folders alphabetically rather than in chronological order"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=iciclesoft.workspacesort"; - homepage = "https://github.com/iciclesoft/workspacesort-for-VSCode"; - license = licenses.mit; - maintainers = with maintainers; [ dbirks ]; - }; - }; - - ionide.ionide-fsharp = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "Ionide-fsharp"; - publisher = "Ionide"; - version = "5.10.1"; - sha256 = "sha256-LkWWgyh4khPyUgekVeO8ZzPK+1gTrS8d9Yz6/kHomr8="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/Ionide.Ionide-fsharp/changelog"; - description = "Enhanced F# Language Features for Visual Studio Code"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp"; - homepage = "https://ionide.io"; - license = licenses.mit; - maintainers = with maintainers; [ ratsclub ]; - }; - }; - - elixir-lsp.vscode-elixir-ls = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "elixir-ls"; - publisher = "JakeBecker"; - version = "0.8.0"; - sha256 = "sha256-VD1g4DJfA0vDJ0cyHFDEtCEqQo0nXfPC5vknEU91cPk="; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - influxdata.flux = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "influxdata"; - name = "flux"; - version = "0.6.13"; - sha256 = "0myl7rppzcz7hxy9zjs81vs9p66lnbfcrdr6s5qb4i6929gmywfy"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - jakebecker.elixir-ls = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "elixir-ls"; - publisher = "JakeBecker"; - version = "0.9.0"; - sha256 = "sha256-KNfZOrVxK3/rClHPcIyPgE9CRtjkI7NLY0xZ9W+X6OM="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/JakeBecker.elixir-ls/changelog"; - description = "Elixir support with debugger, autocomplete, and more. Powered by ElixirLS."; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls"; - homepage = "https://github.com/elixir-lsp/elixir-ls"; - license = licenses.mit; - maintainers = with maintainers; [ datafoo ]; - }; - }; - - james-yu.latex-workshop = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "latex-workshop"; - publisher = "James-Yu"; - version = "8.2.0"; - sha256 = "1ai16aam4v5jzhxgms589q0l24kyk1a9in6z4i7g05b3sahyxab2"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - jdinhlife.gruvbox = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "gruvbox"; - publisher = "jdinhlife"; - version = "1.5.1"; - sha256 = "sha256-0ghB0E+Wa9W2bNFFiH2Q3pUJ9HV5+JfKohX4cRyevC8="; - }; - meta = with lib; { - description = "Gruvbox Theme"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=jdinhlife.gruvbox"; - homepage = "https://github.com/jdinhify/vscode-theme-gruvbox"; - license = licenses.mit; - maintainers = with maintainers; [ imgabe ]; - }; - }; - - jnoortheen.nix-ide = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "nix-ide"; - publisher = "jnoortheen"; - version = "0.1.19"; - sha256 = "1ms96ij6z4bysdhqgdaxx2znvczyhzx57iifbqws50m1c3m7pkx7"; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/jnoortheen.nix-ide/changelog"; - description = "Nix language support with formatting and error report"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=jnoortheen.nix-ide"; - homepage = "https://github.com/jnoortheen/vscode-nix-ide"; - license = licenses.mit; - maintainers = with maintainers; [ SuperSandro2000 ]; - }; - }; - - jock.svg = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "svg"; - publisher = "jock"; - version = "1.4.15"; - sha256 = "0a5w6qxvsdzcmgc0yfiagpmz25y90pmzgrxz9899na5qy3pjcbmz"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - johnpapa.vscode-peacock = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-peacock"; - publisher = "johnpapa"; - version = "4.0.0"; - sha256 = "1i65w70f0kikah1cx7m0bji6qd800jabfci0xisdqxyzaksg7ysz"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - jpoissonnier.vscode-styled-components = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-styled-components"; - publisher = "jpoissonnier"; - version = "1.4.1"; - sha256 = "sha256-ojbeuYBCS+DjF5R0aLuBImzoSOb8mXw1s0Uh0CzggzE="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - justusadam.language-haskell = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "language-haskell"; - publisher = "justusadam"; - version = "3.4.0"; - sha256 = "0ab7m5jzxakjxaiwmg0jcck53vnn183589bbxh3iiylkpicrv67y"; - }; - meta = { - license = lib.licenses.bsd3; - }; - }; - - kahole.magit = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "magit"; - publisher = "kahole"; - version = "0.6.18"; - sha256 = "0sqzz5bbqqg60aypvwxcqnxrr72gmwfj9sv0amgkyaf60zg5sf7w"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - kamadorueda.alejandra = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "alejandra"; - publisher = "kamadorueda"; - version = "1.0.0"; - sha256 = "sha256-COlEjKhm8tK5XfOjrpVUDQ7x3JaOLiYoZ4MdwTL8ktk="; - }; - nativeBuildInputs = [ jq moreutils ]; - postInstall = '' - cd "$out/$installPrefix" - - jq -e ' - .contributes.configuration.properties."alejandra.program".default = - "${alejandra}/bin/alejandra" | - .contributes.configurationDefaults."alejandra.program" = - "${alejandra}/bin/alejandra" - ' \ - < package.json \ - | sponge package.json - ''; - meta = with lib; { - description = "The Uncompromising Nix Code Formatter"; - homepage = "https://github.com/kamadorueda/alejandra"; - license = licenses.unlicense; - maintainers = with maintainers; [ kamadorueda ]; - }; - }; - - kubukoz.nickel-syntax = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "nickel-syntax"; - publisher = "kubukoz"; - version = "0.0.1"; - sha256 = "010zn58j9kdb2jpxmlfyyyais51pwn7v2c5cfi4051ayd02b9n3s"; - }; - meta = { - license = lib.licenses.asl20; - }; - }; - - llvm-vs-code-extensions.vscode-clangd = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-clangd"; - publisher = "llvm-vs-code-extensions"; - version = "0.1.13"; - sha256 = "/MpwbM+obcD3uqk8hnDrnbEK9Jot4fMe4sNzLt6mVGI="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - lokalise.i18n-ally = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "i18n-ally"; - publisher = "Lokalise"; - version = "2.7.1"; - sha256 = "sha256-nHBYRSiPQ5ucWPr9VCUgMrosloLnVj40Fh+CEBvWONE="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - mads-hartmann.bash-ide-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "mads-hartmann"; - name = "bash-ide-vscode"; - version = "1.11.0"; - sha256 = "1hq41fy2v1grjrw77mbs9k6ps6gncwlydm03ipawjnsinxc9rdkp"; - }; - meta = { - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ kamadorueda ]; - }; - }; - - mhutchie.git-graph = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "git-graph"; - publisher = "mhutchie"; - version = "1.30.0"; - sha256 = "sha256-sHeaMMr5hmQ0kAFZxxMiRk6f0mfjkg2XMnA4Gf+DHwA="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - mikestead.dotenv = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "dotenv"; - publisher = "mikestead"; - version = "1.0.1"; - sha256 = "sha256-dieCzNOIcZiTGu4Mv5zYlG7jLhaEsJR05qbzzzQ7RWc="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - mishkinf.goto-next-previous-member = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "goto-next-previous-member"; - publisher = "mishkinf"; - version = "0.0.6"; - sha256 = "07rpnbkb51835gflf4fpr0v7fhj8hgbhsgcz2wpag8wdzdxc3025"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - mskelton.one-dark-theme = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "one-dark-theme"; - publisher = "mskelton"; - version = "1.7.2"; - sha256 = "1ks6z8wsxmlfhiwa51f7d6digvw11dlxc7mja3hankgxcf5dyj31"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - mechatroner.rainbow-csv = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "rainbow-csv"; - publisher = "mechatroner"; - version = "2.0.0"; - sha256 = "0wjlp6lah9jb0646sbi6x305idfgydb6a51pgw4wdnni02gipbrs"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - ms-azuretools.vscode-docker = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-docker"; - publisher = "ms-azuretools"; - version = "1.19.0"; - sha256 = "sha256-buIAbsyKUvX3blO1AbCq/tJ1KAcqaFpciqQovmOZ5GE="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - ms-ceintl = callPackage ./language-packs.nix {}; # non-English language packs - - ms-dotnettools.csharp = callPackage ./ms-dotnettools-csharp { }; - - ms-kubernetes-tools.vscode-kubernetes-tools = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-kubernetes-tools"; - publisher = "ms-kubernetes-tools"; - version = "1.3.4"; - sha256 = "0ial5ljgm0m35wh5gy4kpr0v7053wi52cv57ad4vcbxc9z00hxrd"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - ms-vscode.cpptools = callPackage ./cpptools { }; - - ms-vscode-remote.remote-ssh = callPackage ./remote-ssh { }; - - ms-vscode.theme-tomorrowkit = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "Theme-TomorrowKit"; - publisher = "ms-vscode"; - version = "0.1.4"; - sha256 = "sha256-qakwJWak+IrIeeVcMDWV/fLPx5M8LQGCyhVt4TS/Lmc="; - }; - meta = with lib; { - description = "Additional Tomorrow and Tomorrow Night themes for VS Code. Based on the TextMate themes."; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-vscode.Theme-TomorrowKit"; - homepage = "https://github.com/microsoft/vscode-themes"; - license = licenses.mit; - maintainers = with maintainers; [ ratsclub ]; - }; - }; - - ms-pyright.pyright = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "pyright"; - publisher = "ms-pyright"; - version = "1.1.222"; - sha256 = "sha256-QMX/SawDEnG1xVrug8mvN7EvRrRDkJffcXBUFpQi1XE="; - }; - meta = with lib; { - description = "VS Code static type checking for Python"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-pyright.pyright"; - homepage = "https://github.com/Microsoft/pyright#readme"; - changelog = "https://marketplace.visualstudio.com/items/ms-pyright.pyright/changelog"; - license = licenses.mit; - maintainers = with maintainers; [ ratsclub ]; - }; - }; - - ms-python.python = callPackage ./python { - extractNuGet = callPackage ./python/extract-nuget.nix { }; - }; - - msjsdiag.debugger-for-chrome = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "debugger-for-chrome"; - publisher = "msjsdiag"; - version = "4.12.11"; - sha256 = "sha256-9i3TgCFThnFF5ccwzS4ATj5c2Xoe/4tDFGv75jJxeQ4="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - ms-toolsai.jupyter = callPackage ./ms-toolsai-jupyter {}; - - ms-toolsai.jupyter-renderers = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "jupyter-renderers"; - publisher = "ms-toolsai"; - version = "1.0.4"; - sha256 = "sha256-aKWu0Gp0f28DCv2akF/G8UDaGfTN410CcH8CAmW7mgU="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - ms-vscode.anycode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "anycode"; - publisher = "ms-vscode"; - version = "0.0.57"; - sha256 = "sha256-XwL7I+vwZJ6zx5IDZdfOUbq6M9IH/gi7MBe92cG1kDs="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - mvllow.rose-pine = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "mvllow"; - name = "rose-pine"; - version = "1.3.6"; - sha256 = "sha256-pKrwiA/ZArBfumT0VTauhINSDEbABWgBBzTZEE07wzk="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - naumovs.color-highlight = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "color-highlight"; - publisher = "naumovs"; - version = "2.5.0"; - sha256 = "sha256-dYMDV84LEGXUjt/fbsSy3BVM5SsBHcPaDDll8KjPIWY="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/naumovs.color-highlight/changelog"; - description = "Highlight web colors in your editor"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=naumovs.color-highlight"; - homepage = "https://github.com/enyancc/vscode-ext-color-highlight"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ datafoo ]; - }; - }; - - octref.vetur = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vetur"; - publisher = "octref"; - version = "0.34.1"; - sha256 = "09w3bik1mxs7qac67wgrc58vl98ham3syrn2anycpwd7135wlpby"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - oderwat.indent-rainbow = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "indent-rainbow"; - publisher = "oderwat"; - version = "8.2.2"; - sha256 = "sha256-7kkJc+hhYaSKUbK4eYwOnLvae80sIg7rd0E4YyCXtPc="; - }; - meta = with lib; { - description = "Makes indentation easier to read"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow"; - homepage = "https://github.com/oderwat/vscode-indent-rainbow"; - license = licenses.mit; - maintainers = with maintainers; [ imgabe ]; - }; - }; - - redhat.java = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "java"; - publisher = "redhat"; - version = "1.2.0"; - sha256 = "sha256-YmR3FWhPZSU2gE6NIVoA1HZBzaYaTNYFXC/uNwbDEdQ="; - }; - buildInputs = [ jdk ]; - meta = { - license = lib.licenses.epl20; - broken = lib.versionOlder jdk.version "11"; - }; - }; - - redhat.vscode-yaml = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-yaml"; - publisher = "redhat"; - version = "1.3.0"; - sha256 = "sha256-Tz6bLcBUATn8cYIzGoLJwgaJZGbBVr1CISmJHz+iM60="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - rioj7.commandOnAllFiles = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "commandOnAllFiles"; - publisher = "rioj7"; - version = "0.3.0"; - sha256 = "sha256-tNFHrgFJ22YGQgkYw+0l4G6OtlUYVn9brJPLnsvSwRE="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - rubymaniac.vscode-paste-and-indent = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-paste-and-indent"; - publisher = "Rubymaniac"; - version = "0.0.8"; - sha256 = "0fqwcvwq37ndms6vky8jjv0zliy6fpfkh8d9raq8hkinfxq6klgl"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - matklad.rust-analyzer = callPackage ./rust-analyzer { }; - - ocamllabs.ocaml-platform = buildVscodeMarketplaceExtension { - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/ocamllabs.ocaml-platform/changelog"; - description = "Official OCaml Support from OCamlLabs"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform"; - homepage = "https://github.com/ocamllabs/vscode-ocaml-platform"; - license = licenses.isc; - maintainers = with maintainers; [ ratsclub ]; - }; - mktplcRef = { - name = "ocaml-platform"; - publisher = "ocamllabs"; - version = "1.8.4"; - sha256 = "sha256-T1eYAuYMv4B7rdECxYzNfIpydjzCDjeo7gmb1uhr6VM="; - }; - }; - - pkief.material-icon-theme = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "material-icon-theme"; - publisher = "PKief"; - version = "4.12.1"; - sha256 = "sha256-pmWnnZrdk6zb8YFG5ESgK4k875hgeseWyzkA9YUjg7A="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - pkief.material-product-icons = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "material-product-icons"; - publisher = "PKief"; - version = "1.1.1"; - sha256 = "a0bd0eff67793828768135fd839f28db0949da9a310db312beb0781f2164fd47"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - ritwickdey.liveserver = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "liveserver"; - publisher = "ritwickdey"; - version = "5.6.1"; - sha256 = "sha256-QPMZMttYV+dQfWTniA7nko7kXukqU9g6Wj5YDYfL6hw="; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - roman.ayu-next = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "ayu-next"; - publisher = "roman"; - version = "1.2.9"; - sha256 = "sha256-rwZnqvHRmMquNq9PnU176vI4g8PtS6wSNvQaZ1BMa4I="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - rubbersheep.gi = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "gi"; - publisher = "rubbersheep"; - version = "0.2.11"; - sha256 = "0j9k6wm959sziky7fh55awspzidxrrxsdbpz1d79s5lr5r19rs6j"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - ryu1kn.partial-diff = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "partial-diff"; - publisher = "ryu1kn"; - version = "1.4.3"; - sha256 = "0x3lkvna4dagr7s99yykji3x517cxk5kp7ydmqa6jb4bzzsv1s6h"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - scala-lang.scala = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "scala"; - publisher = "scala-lang"; - version = "0.5.5"; - sha256 = "1gqgamm97sq09za8iyb06jf7hpqa2mlkycbx6zpqwvlwd3a92qr1"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - scalameta.metals = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "metals"; - publisher = "scalameta"; - version = "1.12.18"; - sha256 = "104h3qfdn0y4138g3mdw1209qqh3mj3jsdsbzpnw2plk1cmr3nx5"; - }; - meta = { - license = lib.licenses.asl20; - }; - }; - - serayuzgur.crates = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "crates"; - publisher = "serayuzgur"; - version = "0.5.10"; - sha256 = "1dbhd6xbawbnf9p090lpmn8i5gg1f7y8xk2whc9zhg4432kdv3vd"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - shardulm94.trailing-spaces = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "shardulm94"; - name = "trailing-spaces"; - version = "0.3.1"; - sha256 = "0h30zmg5rq7cv7kjdr5yzqkkc1bs20d72yz9rjqag32gwf46s8b8"; - }; - meta = { - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ kamadorueda ]; - }; - }; - - shyykoserhiy.vscode-spotify = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-spotify"; - publisher = "shyykoserhiy"; - version = "3.2.1"; - sha256 = "14d68rcnjx4a20r0ps9g2aycv5myyhks5lpfz0syr2rxr4kd1vh6"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - silvenon.mdx = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "mdx"; - publisher = "silvenon"; - version = "0.1.0"; - sha256 = "1mzsqgv0zdlj886kh1yx1zr966yc8hqwmiqrb1532xbmgyy6adz3"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - skyapps.fish-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "fish-vscode"; - publisher = "skyapps"; - version = "0.2.1"; - sha256 = "0y1ivymn81ranmir25zk83kdjpjwcqpnc9r3jwfykjd9x0jib2hl"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - slevesque.vscode-multiclip = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-multiclip"; - publisher = "slevesque"; - version = "0.1.5"; - sha256 = "1cg8dqj7f10fj9i0g6mi3jbyk61rs6rvg9aq28575rr52yfjc9f9"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - spywhere.guides = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "guides"; - publisher = "spywhere"; - version = "0.9.3"; - sha256 = "1kvsj085w1xax6fg0kvsj1cizqh86i0pkzpwi0sbfvmcq21i6ghn"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - stephlin.vscode-tmux-keybinding = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-tmux-keybinding"; - publisher = "stephlin"; - version = "0.0.6"; - sha256 = "0mph2nval1ddmv9hpl51fdvmagzkqsn8ljwqsfha2130bb7la0d9"; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/stephlin.vscode-tmux-keybinding/changelog"; - description = "A simple extension for tmux behavior in vscode terminal."; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=stephlin.vscode-tmux-keybinding"; - homepage = "https://github.com/StephLin/vscode-tmux-keybinding"; - license = licenses.mit; - maintainers = with maintainers; [ dbirks ]; - }; - }; - - stkb.rewrap = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "stkb"; - name = "rewrap"; - version = "1.16.1"; - sha256 = "sha256-OTPNbwoQmKd73g8IwLKMIbe6c7E2jKNkzwuBU/f8dmY="; - }; - meta = with lib; { - changelog = "https://github.com/stkb/Rewrap/blob/master/CHANGELOG.md"; - description = "Hard word wrapping for comments and other text at a given column."; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=stkb.rewrap"; - homepage = "https://github.com/stkb/Rewrap#readme"; - license = licenses.asl20; - maintainers = with maintainers; [ datafoo ]; - }; - }; - - streetsidesoftware.code-spell-checker = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "code-spell-checker"; - publisher = "streetsidesoftware"; - version = "2.1.5"; - sha256 = "sha256-nIR3PtbtnSbAU0rS+qVtPsj++Dbfp/k86dWkx4xYcno="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/streetsidesoftware.code-spell-checker/changelog"; - description = "Spelling checker for source code"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker"; - homepage = "https://streetsidesoftware.github.io/vscode-spell-checker"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ datafoo ]; - }; - }; - - svelte.svelte-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "svelte-vscode"; - publisher = "svelte"; - version = "105.3.0"; - sha256 = "11plqsj3c4dv0xg2d76pxrcn382qr9wbh1lhln2x8mzv840icvwr"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - svsool.markdown-memo = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "markdown-memo"; - publisher = "svsool"; - version = "0.3.18"; - sha256 = "sha256-ypYqVH1ViJE7+mAJnxmpvUSmiImOo7rE7m+ijTEpmwg="; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/svsool.markdown-memo/changelog"; - description = "Markdown knowledge base with bidirectional [[link]]s built on top of VSCode"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=svsool.markdown-memo"; - homepage = "https://github.com/svsool/vscode-memo"; - license = licenses.mit; - maintainers = with maintainers; [ ratsclub ]; - }; - }; - - tabnine.tabnine-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "tabnine-vscode"; - publisher = "tabnine"; - version = "3.4.27"; - sha256 = "sha256-Xg/N59a38OKEWb/4anysslensUoj9ENcuobkyByFDxE="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - takayama.vscode-qq = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "takayama"; - name = "vscode-qq"; - version = "1.4.0"; - sha256 = "sha256-DYjNWSKOrDYvdiV7G24uKz6w4ggeYUMkQIiOGZAbMSI="; - }; - meta = { - license = lib.licenses.mpl20; - }; - }; - - tamasfe.even-better-toml = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "even-better-toml"; - publisher = "tamasfe"; - version = "0.14.2"; - sha256 = "17djwa2bnjfga21nvyz8wwmgnjllr4a7nvrsqvzm02hzlpwaskcl"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - tiehuis.zig = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "zig"; - publisher = "tiehuis"; - version = "0.2.5"; - sha256 = "sha256-P8Sep0OtdchTfnudxFNvIK+SW++TyibGVI9zd+B5tu4="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - - timonwong.shellcheck = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "shellcheck"; - publisher = "timonwong"; - version = "0.18.4"; - sha256 = "00cii58md6v028h0xfvbdjvg3r44451mi0lfmjwiwif5xcw3wnlx"; - }; - nativeBuildInputs = [ jq moreutils ]; - postInstall = '' - cd "$out/$installPrefix" - jq '.contributes.configuration.properties."shellcheck.executablePath".default = "${shellcheck}/bin/shellcheck"' package.json | sponge package.json - ''; - meta = { - license = lib.licenses.mit; - }; - }; - - tobiasalthoff.atom-material-theme = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "atom-material-theme"; - publisher = "tobiasalthoff"; - version = "1.10.7"; - sha256 = "sha256-t5CKrDEbDCuo28wN+hiWrvkt3C9vQAPfV/nd3QBGQ/s="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - tomoki1207.pdf = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "pdf"; - publisher = "tomoki1207"; - version = "1.2.0"; - sha256 = "1bcj546bp0w4yndd0qxwr8grhiwjd1jvf33jgmpm0j96y34vcszz"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - tuttieee.emacs-mcx = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "emacs-mcx"; - publisher = "tuttieee"; - version = "0.37.1"; - sha256 = "19969qb6ink70km4wawh4w238igdm6npwskyr3hx38qgf69nd748"; - }; - meta = { - changelog = "https://github.com/whitphx/vscode-emacs-mcx/blob/main/CHANGELOG.md"; - description = "Awesome Emacs Keymap - VSCode emacs keybinding with multi cursor support"; - homepage = "https://github.com/whitphx/vscode-emacs-mcx"; - license = lib.licenses.mit; - }; - }; - - tyriar.sort-lines = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "sort-lines"; - publisher = "Tyriar"; - version = "1.9.1"; - sha256 = "0dds99j6awdxb0ipm15g543a5b6f0hr00q9rz961n0zkyawgdlcb"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - usernamehw.errorlens = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "errorlens"; - publisher = "usernamehw"; - version = "3.4.1"; - sha256 = "1mr8si7jglpjw8qzl4af1k7r68vz03fpal1dr8i0iy4ly26pz7bh"; - }; - meta = with lib; { - changelog = "https://marketplace.visualstudio.com/items/usernamehw.errorlens/changelog"; - description = "Improve highlighting of errors, warnings and other language diagnostics."; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens"; - homepage = "https://github.com/usernamehw/vscode-error-lens"; - license = licenses.mit; - maintainers = with maintainers; [ imgabe ]; - }; - }; - - vadimcn.vscode-lldb = callPackage ./vscode-lldb { }; - - valentjn.vscode-ltex = vscode-utils.buildVscodeMarketplaceExtension rec { - mktplcRef = { - name = "vscode-ltex"; - publisher = "valentjn"; - version = "13.1.0"; - }; - - vsix = fetchurl { - name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; - url = "https://github.com/valentjn/vscode-ltex/releases/download/${mktplcRef.version}/vscode-ltex-${mktplcRef.version}-offline-linux-x64.vsix"; - sha256 = "1nlrijjwc35n1xgb5lgnr4yvlgfcxd0vdj93ip8lv2xi8x1ni5f6"; - }; - - nativeBuildInputs = [ jq moreutils ]; - - buildInputs = [ jdk ]; - - postInstall = '' - cd "$out/$installPrefix" - jq '.contributes.configuration.properties."ltex.java.path".default = "${jdk}"' package.json | sponge package.json - ''; - - meta = with lib; { - license = licenses.mpl20; - maintainers = [ maintainers._0xbe7a ]; - }; - }; - - viktorqvarfordt.vscode-pitch-black-theme = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-pitch-black-theme"; - publisher = "ViktorQvarfordt"; - version = "1.2.4"; - sha256 = "sha256-HTXToZv0WWFjuQiofEJuaZNSDTmCUcZ0B3KOn+CVALw="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - - vincaslt.highlight-matching-tag = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "highlight-matching-tag"; - publisher = "vincaslt"; - version = "0.10.1"; - sha256 = "0b9jpwiyxax783gyr9zhx7sgrdl9wffq34fi7y67vd68q9183jw1"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - ms-vsliveshare.vsliveshare = callPackage ./ms-vsliveshare-vsliveshare { }; - - vscodevim.vim = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vim"; - publisher = "vscodevim"; - version = "1.21.5"; - sha256 = "1v1xs1wcigisr6xip31i02cfryxrb157sla34y59pwlnhc5x1gny"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - vspacecode.vspacecode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vspacecode"; - publisher = "VSpaceCode"; - version = "0.10.1"; - sha256 = "sha256-H7SCC/ZhDswMQjLX+qpQa6A1N83MobJRPC4pyIbZ1kA="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - vspacecode.whichkey = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "whichkey"; - publisher = "VSpaceCode"; - version = "0.9.2"; - sha256 = "sha256-f+t2d8iWW88OYzuYFxzQPnmFMgx/DELBywYhA8A/0EU="; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - wix.vscode-import-cost = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-import-cost"; - publisher = "wix"; - version = "2.15.0"; - sha256 = "0d3b6654cdck1syn74vmmd1jmgkrw5v4c4cyrhdxbhggkip732bc"; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - xadillax.viml = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "viml"; - publisher = "xadillax"; - version = "1.0.1"; - sha256 = "sha256-mzf2PBSbvmgPjchyKmTaf3nASUi5/S9Djpoeh0y8gH0="; - }; - meta = with lib; { - license = licenses.mit; - }; - }; - - xaver.clang-format = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "clang-format"; - publisher = "xaver"; - version = "1.9.0"; - sha256 = "abd0ef9176eff864f278c548c944032b8f4d8ec97d9ac6e7383d60c92e258c2f"; - }; - meta = with lib; { - license = licenses.mit; - maintainers = [ maintainers.zeratax ]; - }; - }; - - xyz.local-history = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "local-history"; - publisher = "xyz"; - version = "1.8.1"; - sha256 = "1mfmnbdv76nvwg4xs3rgsqbxk8hw9zr1b61har9c3pbk9r4cay7v"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - yzhang.markdown-all-in-one = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "markdown-all-in-one"; - publisher = "yzhang"; - version = "3.4.0"; - sha256 = "0ihfrsg2sc8d441a2lkc453zbw1jcpadmmkbkaf42x9b9cipd5qb"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - zhuangtongfa.material-theme = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "material-theme"; - publisher = "zhuangtongfa"; - version = "3.13.17"; - sha256 = "100riqnvc2j315i1lvnwxmgga17s369xxvds5skgnk2yi2xnm2g9"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - llvm-org.lldb-vscode = llvmPackages_8.lldb; - - WakaTime.vscode-wakatime = callPackage ./wakatime { }; - - wholroyd.jinja = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "jinja"; - publisher = "wholroyd"; - version = "0.0.8"; - sha256 = "1ln9gly5bb7nvbziilnay4q448h9npdh7sd9xy277122h0qawkci"; - }; - meta = { - license = lib.licenses.mit; - }; - }; - - zxh404.vscode-proto3 = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-proto3"; - publisher = "zxh404"; - version = "0.5.4"; - sha256 = "08dfl5h1k6s542qw5qx2czm1wb37ck9w2vpjz44kp2az352nmksb"; - }; - nativeBuildInputs = [ jq moreutils ]; - postInstall = '' - cd "$out/$installPrefix" - jq '.contributes.configuration.properties.protoc.properties.path.default = "${protobuf}/bin/protoc"' package.json | sponge package.json - ''; - meta = { - license = lib.licenses.mit; - }; - }; - }; - - aliases = self: super: { - # aliases - ms-vscode = lib.recursiveUpdate super.ms-vscode { inherit (super.golang) go; }; - }; - - # TODO: add overrides overlay, so that we can have a generated.nix - # then apply extension specific modifcations to packages. - - # overlays will be applied left to right, overrides should come after aliases. - overlays = lib.optionals (config.allowAliases or true) [ aliases ]; - - toFix = lib.foldl' (lib.flip lib.extends) baseExtensions overlays; -in -lib.fix toFix diff --git a/pkgs/misc/vscode-extensions/language-packs.nix b/pkgs/misc/vscode-extensions/language-packs.nix deleted file mode 100644 index f97727d6c2c..00000000000 --- a/pkgs/misc/vscode-extensions/language-packs.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ lib, vscode-utils }: - -with vscode-utils; - -let - - buildVscodeLanguagePack = { language, sha256 }: - buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-language-pack-${language}"; - publisher = "MS-CEINTL"; - version = "1.64.3"; - inherit sha256; - }; - meta = { - license = lib.licenses.mit; - }; - }; - -in - -# See list of core language packs at https://github.com/Microsoft/vscode-loc -{ - # French - vscode-language-pack-fr = buildVscodeLanguagePack { - language = "fr"; - sha256 = "sha256-6ynT1sbMgKO8iZReQ6KxFpR1VL3Nuo58MvXCtp+67vA="; - }; - # Italian - vscode-language-pack-it = buildVscodeLanguagePack { - language = "it"; - sha256 = "sha256-5aNFpzNMZAZJH3n0rJevke9P6AW0au5i8+r4PXsb9Rg="; - }; - # German - vscode-language-pack-de = buildVscodeLanguagePack { - language = "de"; - sha256 = "sha256-oEaWtsgktHKw52lnZTESkpzC/TTY8LO4yX11IgtMG5U="; - }; - # Spanish - vscode-language-pack-es = buildVscodeLanguagePack { - language = "es"; - sha256 = "sha256-utLWbved3WCCk3XzqedbYzmyaKfbMrAmR0btT09GlxA="; - }; - # Russian - vscode-language-pack-ru = buildVscodeLanguagePack { - language = "ru"; - sha256 = "sha256-0Wr2ICOiaaj4jZ555bxUJcmXO/yWDyn0UmdvxUF3WSQ="; - }; - # Chinese (Simplified) - vscode-language-pack-zh-hans = buildVscodeLanguagePack { - language = "zh-hans"; - sha256 = "sha256-irTSQcVXf/V3MuZwfx4tFcvBk+xhbFZTnb7IG28s/p4="; - }; - # Chinese (Traditional) - vscode-language-pack-zh-hant = buildVscodeLanguagePack { - language = "zh-hant"; - sha256 = "sha256-3IA/VTTTEqS6jrDYv50GnLXOTSC1XAMvqOVfOuvIdIs="; - }; - # Japanese - vscode-language-pack-ja = buildVscodeLanguagePack { - language = "ja"; - sha256 = "sha256-rxod70ddrppEYYzukksVY1dTXR8osLFAsIPr1fSFZDg="; - }; - # Korean - vscode-language-pack-ko = buildVscodeLanguagePack { - language = "ko"; - sha256 = "sha256-QYFaxJz1PqKKIiLosLQ8Tu3JNXzpxLFqgIHjjRLwjA4="; - }; - # Czech - vscode-language-pack-cs = buildVscodeLanguagePack { - language = "cs"; - sha256 = "sha256-eMk+syy2h+Xb3k6QB8PqYaF4I1ydaY6eRsvOXmelh9Q="; - }; - # Portuguese (Brazil) - vscode-language-pack-pt-br = buildVscodeLanguagePack { - language = "pt-BR"; - sha256 = "sha256-7Trz38KBl4sD7608MvTs02pUsdD05oHEj3Sp1LvtI7I="; - }; - # Turkish - vscode-language-pack-tr = buildVscodeLanguagePack { - language = "tr"; - sha256 = "sha256-T4CTpbve3vrNdW4VDfHDg8U8cQEtuxPV5LvNdtKrqzA"; - }; - # Pseudo Language - vscode-language-pack-qps-ploc = buildVscodeLanguagePack { - language = "qps-ploc"; - sha256 = "sha256-rPvCr3uQPfM8vwKoV7Un5aiMZClhf6TvG1PEe3xYNI0="; - }; -} diff --git a/pkgs/misc/vscode-extensions/mktplcExtRefToFetchArgs.nix b/pkgs/misc/vscode-extensions/mktplcExtRefToFetchArgs.nix deleted file mode 100644 index a781250fc18..00000000000 --- a/pkgs/misc/vscode-extensions/mktplcExtRefToFetchArgs.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ publisher, name, version, sha256 ? "" }: -{ - url = "https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"; - sha256 = sha256; - # The `*.vsix` file is in the end a simple zip file. Change the extension - # so that existing `unzip` hooks takes care of the unpacking. - name = "${publisher}-${name}.zip"; -} diff --git a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix deleted file mode 100644 index d91cbccb808..00000000000 --- a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix +++ /dev/null @@ -1,152 +0,0 @@ -{ lib -, fetchurl -, vscode-utils -, unzip -, patchelf -, makeWrapper -, icu -, stdenv -, openssl -, mono -}: - -let - # Get as close as possible as the `package.json` required version. - # This is what drives omnisharp. - rtDepsSrcsFromJson = lib.importJSON ./rt-deps-bin-srcs.json; - - rtDepsBinSrcs = builtins.mapAttrs (k: v: - let - # E.g: "OmniSharp-x86_64-linux" - kSplit = builtins.split "(__)" k; - name = builtins.elemAt kSplit 0; - system = builtins.elemAt kSplit 2; - in - { - inherit name system; - installPath = v.installPath; - binaries = v.binaries; - bin-src = fetchurl { - urls = v.urls; - inherit (v) sha256; - }; - } - ) - rtDepsSrcsFromJson; - - rtDepBinSrcByName = bSrcName: - rtDepsBinSrcs."${bSrcName}__${stdenv.targetPlatform.system}"; - - omnisharp = rtDepBinSrcByName "OmniSharp"; - vsdbgs = [ - (rtDepBinSrcByName "Debugger") - ] ++ lib.optionals (stdenv.isDarwin) [ - # Include the aarch64-darwin debugger binaries on x86_64-darwin. Even though OmniSharp will be - # running under Rosetta 2, debugging will fail to start if both sets of binaries are not present. - (rtDepsBinSrcs."Debugger__aarch64-darwin") - ]; - razor = rtDepBinSrcByName "Razor"; -in - -vscode-utils.buildVscodeMarketplaceExtension { - mktplcRef = { - name = "csharp"; - publisher = "ms-dotnettools"; - version = "1.23.16"; - sha256 = "sha256-fM4vcSMi2tEjIox9Twh2sRiFhXgAeRwAM9to3vtcSqI="; - }; - - nativeBuildInputs = [ - unzip - patchelf - makeWrapper - ]; - - postPatch = '' - declare ext_unique_id - # See below as to why we cannot take the whole basename. - ext_unique_id="$(basename "$out" | head -c 32)" - - # Fix 'Unable to connect to debuggerEventsPipeName .. exceeds the maximum length 107.' when - # attempting to launch a specific test in debug mode. The extension attemps to open - # a pipe in extension dir which would fail anyway. We change to target file path - # to a path in tmp dir with a short name based on the unique part of the nix store path. - # This is however a brittle patch as we're working on minified code. - # Hence the attempt to only hold on stable names. - # However, this really would better be fixed upstream. - sed -i \ - -E -e 's/(this\._pipePath=[a-zA-Z0-9_]+\.join\()([a-zA-Z0-9_]+\.getExtensionPath\(\)[^,]*,)/\1require("os").tmpdir(), "'"$ext_unique_id"'"\+/g' \ - "$PWD/dist/extension.js" - - unzip_to() { - declare src_zip="''${1?}" - declare target_dir="''${2?}" - mkdir -p "$target_dir" - if unzip "$src_zip" -d "$target_dir"; then - true - elif [[ "1" -eq "$?" ]]; then - 1>&2 echo "WARNING: unzip('$?' -> skipped files)." - else - 1>&2 echo "ERROR: unzip('$?')." - fi - } - - patchelf_add_icu_as_needed() { - declare elf="''${1?}" - declare icu_major_v="${ - with builtins; head (splitVersion (parseDrvName icu.name).version)}" - - 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?}" - - patchelf_add_icu_as_needed "$elf" - patchelf --add-needed "libssl.so" "$elf" - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc openssl.out icu.out ]}:\$ORIGIN" \ - "$elf" - } - - declare omnisharp_dir="$PWD/${omnisharp.installPath}" - unzip_to "${omnisharp.bin-src}" "$omnisharp_dir" - rm "$omnisharp_dir/bin/mono" - ln -s -T "${mono}/bin/mono" "$omnisharp_dir/bin/mono" - chmod a+x "$omnisharp_dir/run" - touch "$omnisharp_dir/install.Lock" - - '' + builtins.concatStringsSep "\n" (map (vsdbg: '' - declare vsdbg_dir="$PWD/${vsdbg.installPath}" - unzip_to "${vsdbg.bin-src}" "$vsdbg_dir" - chmod a+x "$vsdbg_dir/vsdbg-ui" - chmod a+x "$vsdbg_dir/vsdbg" - touch "$vsdbg_dir/install.complete" - touch "$vsdbg_dir/install.Lock" - - '') vsdbgs) + '' - declare razor_dir="$PWD/${razor.installPath}" - unzip_to "${razor.bin-src}" "$razor_dir" - chmod a+x "$razor_dir/rzls" - touch "$razor_dir/install.Lock" - - '' + lib.optionalString stdenv.isLinux '' - patchelf_common "$vsdbg_dir/vsdbg" - patchelf_common "$vsdbg_dir/vsdbg-ui" - patchelf_common "$razor_dir/rzls" - - '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace $omnisharp_dir/etc/config \ - --replace "libmono-native-compat.dylib" "libmono-native.dylib" - ''; - - meta = with lib; { - description = "C# for Visual Studio Code (powered by OmniSharp)"; - homepage = "https://github.com/OmniSharp/omnisharp-vscode"; - license = licenses.mit; - maintainers = [ maintainers.jraygauthier ]; - platforms = [ "x86_64-linux" "x86_64-darwin" ]; - }; -} diff --git a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json deleted file mode 100644 index 13678d1097e..00000000000 --- a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "OmniSharp__x86_64-darwin": { - "installPath": ".omnisharp/1.37.16", - "binaries": [ - "./mono.osx", - "./run" - ], - "urls": [ - "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/0ea1ea1eae48552a1992ed6df782353a/omnisharp-osx-1.37.16.zip", - "https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-osx-1.37.16.zip" - ], - "sha256": "0hhgfx7zs1rljhn3n9c7lci7j15yp2448z3f1d3c47a95l1hmlip" - }, - "OmniSharp__x86_64-linux": { - "installPath": ".omnisharp/1.37.16", - "binaries": [ - "./mono.linux-x86_64", - "./run" - ], - "urls": [ - "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/9ae3ed99fc0c41c7139751dde6f2bc78/omnisharp-linux-x64-1.37.16.zip", - "https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-linux-x64-1.37.16.zip" - ], - "sha256": "0a2basc6dw42fnjv9zz93ff0bsw2i3446gvcjx5mn5d8dasi483i" - }, - "Debugger__x86_64-darwin": { - "installPath": ".debugger/x86_64", - "binaries": [ - "./vsdbg-ui", - "./vsdbg" - ], - "urls": [ - "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/c1122f7141735472d9583c1124024c55/coreclr-debug-osx-x64.zip", - "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-osx-x64.zip" - ], - "sha256": "08z3k0h25gdsbmlxwayd94672hp2z7zmwdmd0nyr9j82izj3ci2m" - }, - "Debugger__aarch64-darwin": { - "installPath": ".debugger/arm64", - "binaries": [ - "./vsdbg-ui", - "./vsdbg" - ], - "urls": [ - "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/96a88189c7904a517f3bb59b2dba8bd1/coreclr-debug-osx-arm64.zip", - "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-osx-arm64.zip" - ], - "sha256": "113kz02ihvb4y5fj01wamqz2jsql2q7n7f55s9kzs9dsrmq5ffa0" - }, - "Debugger__aarch64-linux": { - "installPath": ".debugger", - "binaries": [ - "./vsdbg-ui", - "./vsdbg" - ], - "urls": [ - "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/7a723bfbda6d196c52084226b6835b36/coreclr-debug-linux-arm64.zip", - "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-linux-arm64.zip" - ], - "sha256": "1d4a5q3f7qfk3jq2i4f6g50i9i4z8z7g8ss083y9n5c1yj3629kw" - }, - "Debugger__x86_64-linux": { - "installPath": ".debugger", - "binaries": [ - "./vsdbg-ui", - "./vsdbg" - ], - "urls": [ - "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/dd019b4c839f458596e26bfcfe6a3e7f/coreclr-debug-linux-x64.zip", - "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-linux-x64.zip" - ], - "sha256": "0c5y0035sa07bl3m3iiqccqd92xjwpcfjrqhmi5xligk40q2i2gk" - }, - "Razor__x86_64-linux": { - "installPath": ".razor", - "binaries": [ - "./rzls" - ], - "urls": [ - "https://download.visualstudio.microsoft.com/download/pr/b8678010-2cd7-4201-a5e7-ba57920607d5/b846e9c7d7afdba54a72fae1dcb6c42c/razorlanguageserver-linux-x64-6.0.0-preview.5.21358.6.zip" - ], - "sha256": "0gb36nlb7fgcv03a0awna1qyrsky6ys5gkpsmvxc5j35f1yq337b" - }, - "Razor__x86_64-darwin": { - "installPath": ".razor", - "binaries": [ - "./rzls" - ], - "urls": [ - "https://download.visualstudio.microsoft.com/download/pr/b8678010-2cd7-4201-a5e7-ba57920607d5/ad846449769eb2ae810d0236823a6aaa/razorlanguageserver-osx-x64-6.0.0-preview.5.21358.6.zip" - ], - "sha256": "0iqinpwwlqwajdq4i1qbb9hfpfmgy17av95bpw02ad2f9fnyh572" - } -} diff --git a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs deleted file mode 100755 index 8c43231b1a7..00000000000 --- a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -I nixpkgs=../../../.. -i bash -p curl jq unzip -set -euf -o pipefail - -declare scriptDir -scriptDir=$(cd "$(dirname "$0")"; pwd) -1>&2 echo "scriptDir='$scriptDir'" - -. "$scriptDir/../_maintainers/update-bin-srcs-lib.sh" - -declare extPublisher="ms-dotnettools" -declare extName="csharp" -declare defaultExtVersion="1.23.16" -declare extVersion="${1:-$defaultExtVersion}" - -formatExtRuntimeDeps \ - "$extPublisher" "$extName" "$extVersion" \ - | computeAndAttachExtRtDepsChecksums \ - | jqStreamToJson \ - | tee "$scriptDir/rt-deps-bin-srcs.json" \ - | jq '.' diff --git a/pkgs/misc/vscode-extensions/ms-toolsai-jupyter/default.nix b/pkgs/misc/vscode-extensions/ms-toolsai-jupyter/default.nix deleted file mode 100644 index 6be5e225fa3..00000000000 --- a/pkgs/misc/vscode-extensions/ms-toolsai-jupyter/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, vscode-utils, jq, moreutils }: - -let - inherit (vscode-utils) buildVscodeMarketplaceExtension; - -in buildVscodeMarketplaceExtension { - mktplcRef = { - name = "jupyter"; - publisher = "ms-toolsai"; - version = "2021.9.1101343141"; - sha256 = "1c5dgkk5yn6a8k3blbqakqdy8ppwgfbm0ciki7ix696bvlksbpdg"; - }; - - nativeBuildInputs = [ - jq - moreutils - ]; - - postPatch = '' - # Patch 'packages.json' so that the expected '__metadata' field exists. - # This works around observed extension load failure on vscode's attempt - # to rewrite 'packages.json' with this new information. - print_jq_query() { - cat <<"EOF" - .__metadata = { - "id": "6c2f1801-1e7f-45b2-9b5c-7782f1e076e8", - "publisherId": "ac8eb7c9-3e59-4b39-8040-f0484d8170ce", - "publisherDisplayName": "Microsoft", - "installedTimestamp": 0 - } - EOF - } - jq "$(print_jq_query)" ./package.json | sponge ./package.json - ''; - - meta = with lib; { - description = "Jupyter extension for vscode"; - homepage = "https://github.com/microsoft/vscode-jupyter"; - license = licenses.mit; - maintainers = with maintainers; [ jraygauthier ]; - }; -} diff --git a/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix b/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix deleted file mode 100644 index d4200c33552..00000000000 --- a/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix +++ /dev/null @@ -1,134 +0,0 @@ -# Based on previous attempts: -# - -# - -{ 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 -}: - -with lib; - -let - # https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually - libs = [ - # .NET Core - openssl - libkrb5 - zlib - icu - - # Credential Storage - libsecret - - # NodeJS - libX11 - - # https://github.com/flathub/com.visualstudio.code.oss/issues/11#issuecomment-392709170 - libunwind - lttng-ust - curl - - # General - gcc.cc.lib - util-linux # libuuid - ]; - -in ((vscode-utils.override { stdenv = gccStdenv; }).buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vsliveshare"; - publisher = "ms-vsliveshare"; - version = "1.0.5043"; - sha256 = "OdFOFvidUV/trySHvF8iELPNVP2kq8+vZQ4q4Nf7SiQ="; - }; -}).overrideAttrs({ nativeBuildInputs ? [], buildInputs ? [], ... }: { - nativeBuildInputs = nativeBuildInputs ++ [ - bash - jq - autoPatchelfHook - makeWrapper - ]; - 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 \ - --replace "'xsel'" "'${xsel}/bin/xsel'" - ''; - - postInstall = '' - cd $out/share/vscode/extensions/ms-vsliveshare.vsliveshare - - bash -s < null != ctags; - -let - liburcu-0-12 = liburcu.overrideAttrs (oldAttrs: rec { - version = "0.12.2"; - src = fetchurl { - url = "https://lttng.org/files/urcu/userspace-rcu-${version}.tar.bz2"; - sha256 = "0yx69kbx9zd6ayjzvwvglilhdnirq4f1x1sdv33jy8bc9wgc3vsf"; - }; - }); - - lttng-ust-2-10 = (lttng-ust.override { - liburcu = liburcu-0-12; - }).overrideAttrs (oldAttrs: rec { - version = "2.10.5"; - src = fetchurl { - url = "https://lttng.org/files/lttng-ust/lttng-ust-${version}.tar.bz2"; - sha256 = "0ddwk0nl28bkv2xb78gz16a2bvlpfbjmzwfbgwf5p1cq46dyvy86"; - }; - }); - - pythonDefaultsTo = if pythonUseFixed then "${python3}/bin/python" else "python"; - ctagsDefaultsTo = if ctagsUseFixed then "${ctags}/bin/ctags" else "ctags"; - - # The arch tag comes from 'PlatformName' defined here: - # https://github.com/Microsoft/vscode-python/blob/master/src/client/activation/types.ts - arch = - if stdenv.isLinux && stdenv.isx86_64 then "linux-x64" - else if stdenv.isDarwin then "osx-x64" - else throw "Only x86_64 Linux and Darwin are supported."; - - languageServerSha256 = { - linux-x64 = "1pmj5pb4xylx4gdx4zgmisn0si59qx51n2m1bh7clv29q6biw05n"; - osx-x64 = "0ishiy1z9dghj4ryh95vy8rw0v7q4birdga2zdb4a8am31wmp94b"; - }.${arch}; - - # version is languageServerVersion in the package.json - languageServer = extractNuGet rec { - name = "Python-Language-Server"; - version = "0.5.30"; - - src = fetchurl { - url = "https://pvsc.azureedge.net/python-language-server-stable/${name}-${arch}.${version}.nupkg"; - sha256 = languageServerSha256; - }; - }; -in vscode-utils.buildVscodeMarketplaceExtension rec { - mktplcRef = { - name = "python"; - publisher = "ms-python"; - version = "2021.11.1422169775"; - }; - - vsix = fetchurl { - name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; - url = "https://github.com/microsoft/vscode-python/releases/download/${mktplcRef.version}/ms-python-release.vsix"; - sha256 = "sha256-Y8Wbpuieca/edIWqgq+lGSUMABOGvO/GuujGlEGmoKs="; - }; - - buildInputs = [ - icu - curl - openssl - ] ++ lib.optionals stdenv.isLinux [ - lttng-ust-2-10 - musl - ]; - - nativeBuildInputs = [ - python3.pkgs.wrapPython - ] ++ lib.optionals stdenv.isLinux [ - autoPatchelfHook - ]; - - pythonPath = with python3.pkgs; [ - setuptools - ]; - - postPatch = '' - # Patch `packages.json` so that nix's *python* is used as default value for `python.pythonPath`. - substituteInPlace "./package.json" \ - --replace "\"default\": \"python\"" "\"default\": \"${pythonDefaultsTo}\"" - - # Patch `packages.json` so that nix's *ctags* is used as default value for `python.workspaceSymbols.ctagsPath`. - substituteInPlace "./package.json" \ - --replace "\"default\": \"ctags\"" "\"default\": \"${ctagsDefaultsTo}\"" - - # Similar cleanup to what's done in the `debugpy` python package. - # This prevent our autopatchelf logic to bark on unsupported binaries (`attach_x86.so` - # was problematic) but also should make our derivation less heavy. - ( - cd pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_attach_to_process - declare kept_aside="${{ - "x86_64-linux" = "attach_linux_amd64.so"; - "aarch64-darwin" = "attach_x86_64.dylib"; - "x86_64-darwin" = "attach_x86_64.dylib"; - }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")}" - mv "$kept_aside" "$kept_aside.hidden" - rm *.so *.dylib *.dll *.exe *.pdb - mv "$kept_aside.hidden" "$kept_aside" - ) - ''; - - postInstall = '' - mkdir -p "$out/$installPrefix/languageServer.${languageServer.version}" - cp -R --no-preserve=ownership ${languageServer}/* "$out/$installPrefix/languageServer.${languageServer.version}" - chmod -R +wx "$out/$installPrefix/languageServer.${languageServer.version}" - - patchPythonScript "$out/$installPrefix/pythonFiles/lib/python/isort/main.py" - ''; - - meta = with lib; { - license = licenses.mit; - platforms = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; - maintainers = with maintainers; [ jraygauthier jfchevrette ]; - }; -} diff --git a/pkgs/misc/vscode-extensions/python/extract-nuget.nix b/pkgs/misc/vscode-extensions/python/extract-nuget.nix deleted file mode 100644 index 1e70cabe035..00000000000 --- a/pkgs/misc/vscode-extensions/python/extract-nuget.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ stdenv, unzip }: -{ name, version, src, ... }: - -stdenv.mkDerivation { - inherit name version src; - - nativeBuildInputs = [ unzip ]; - dontBuild = true; - unpackPhase = "unzip $src"; - installPhase = '' - mkdir -p "$out" - chmod -R +w . - find . -mindepth 1 -maxdepth 1 | xargs cp -a -t "$out" - ''; -} diff --git a/pkgs/misc/vscode-extensions/remote-ssh/default.nix b/pkgs/misc/vscode-extensions/remote-ssh/default.nix deleted file mode 100644 index 3bfc94bb6ea..00000000000 --- a/pkgs/misc/vscode-extensions/remote-ssh/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ lib -, vscode-utils -, useLocalExtensions ? false -}: -# Note that useLocalExtensions requires that vscode-server is not running -# on host. If it is, you'll need to remove $HOME/.vscode-server, -# and redo the install by running "Connect to host" on client - -let - inherit (vscode-utils) buildVscodeMarketplaceExtension; - - # patch runs on remote machine hence use of which - # links to local node if version is 12 - patch = '' - f="$HOME/.vscode-server/bin/$COMMIT_ID/node" - localNodePath=''$(which node) - if [ -x "''$localNodePath" ]; then - localNodeVersion=''$(node -v) - if [ "\''${localNodeVersion:1:2}" = "12" ]; then - echo PATCH: replacing ''$f with ''$localNodePath - rm ''$f - ln -s ''$localNodePath ''$f - fi - fi - ${lib.optionalString useLocalExtensions '' - # Use local extensions - if [ -d $HOME/.vscode/extensions ]; then - if ! test -L "$HOME/.vscode-server/extensions"; then - mkdir -p $HOME/.vscode-server - ln -s $HOME/.vscode/extensions $HOME/.vscode-server/ - fi - fi - ''} - ''; -in -buildVscodeMarketplaceExtension { - mktplcRef = { - name = "remote-ssh"; - publisher = "ms-vscode-remote"; - version = "0.66.1"; - sha256 = "sha256-+v4UnGRG5xOc8k0IzvHUBHa128fhgd3jcmEuciiMQmI="; - }; - - postPatch = '' - substituteInPlace "out/extension.js" \ - --replace "# install extensions" '${patch}' - ''; - - meta = with lib; { - description = "Use any remote machine with a SSH server as your development environment."; - license = licenses.unfree; - maintainers = with maintainers; [ SuperSandro2000 tbenst ]; - }; -} diff --git a/pkgs/misc/vscode-extensions/rescript/default.nix b/pkgs/misc/vscode-extensions/rescript/default.nix deleted file mode 100644 index 5bad9b2e628..00000000000 --- a/pkgs/misc/vscode-extensions/rescript/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, stdenv, vscode-utils, callPackage }: -let - rescript-editor-analysis = (callPackage ./rescript-editor-analysis.nix { }); - arch = - if stdenv.isLinux then "linux" - else if stdenv.isDarwin then "darwin" - else throw "Unsupported platform"; - analysisDir = "server/analysis_binaries/${arch}"; -in -vscode-utils.buildVscodeMarketplaceExtension rec { - mktplcRef = { - name = "rescript-vscode"; - publisher = "chenglou92"; - version = "1.1.3"; - sha256 = "1c1ipxgm0f0a3vlnhr0v85jr5l3rwpjzh9w8nv2jn5vgvpas0b2a"; - }; - postPatch = '' - rm -r ${analysisDir} - ln -s ${rescript-editor-analysis}/bin ${analysisDir} - ''; - - meta = with lib; { - description = "The official VSCode plugin for ReScript"; - homepage = "https://github.com/rescript-lang/rescript-vscode"; - maintainers = with maintainers; [ dlip ]; - license = licenses.mit; - }; -} diff --git a/pkgs/misc/vscode-extensions/rescript/rescript-editor-analysis.nix b/pkgs/misc/vscode-extensions/rescript/rescript-editor-analysis.nix deleted file mode 100644 index 518280b4b06..00000000000 --- a/pkgs/misc/vscode-extensions/rescript/rescript-editor-analysis.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, bash, ocaml }: - -stdenv.mkDerivation { - pname = "rescript-editor-analysis"; - version = "1.1.3"; - - src = fetchFromGitHub { - owner = "rescript-lang"; - repo = "rescript-vscode"; - rev = "8d0412a72307b220b7f5774e2612760a2d429059"; - sha256 = "rHQtfuIiEWlSPuZvNpEafsvlXCj2Uv1YRR1IfvKfC2s="; - }; - - nativeBuildInputs = [ ocaml ]; - - postPatch = '' - cd analysis - substituteInPlace Makefile --replace "/bin/bash" "${bash}/bin/bash" - ''; - - installPhase = '' - install -D -m0555 rescript-editor-analysis.exe $out/bin/rescript-editor-analysis.exe - ''; - - meta = with lib; { - description = "Analysis binary for the ReScript VSCode plugin"; - homepage = "https://github.com/rescript-lang/rescript-vscode"; - maintainers = with maintainers; [ dlip ]; - license = licenses.mit; - }; -} diff --git a/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json b/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json deleted file mode 100644 index 54a931eee86..00000000000 --- a/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "rust-analyzer", - "version": "0.2.834", - "dependencies": { - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "vscode-languageclient": "8.0.0-next.2", - "d3": "^7.1.0", - "d3-graphviz": "^4.0.0", - "@types/glob": "^7.1.4", - "@types/mocha": "^8.2.3", - "@types/node": "~14.17.5", - "@types/node-fetch": "^2.5.11", - "@types/vscode": "^1.57.0", - "@typescript-eslint/eslint-plugin": "^4.28.2", - "@typescript-eslint/parser": "^4.28.2", - "eslint": "^7.30.0", - "glob": "^7.1.6", - "mocha": "^9.0.2", - "tslib": "^2.3.0", - "typescript": "^4.3.5", - "typescript-formatter": "^7.2.2", - "vsce": "^1.95.1", - "vscode-test": "^1.5.1" - } -} diff --git a/pkgs/misc/vscode-extensions/rust-analyzer/default.nix b/pkgs/misc/vscode-extensions/rust-analyzer/default.nix deleted file mode 100644 index fa08acb84c6..00000000000 --- a/pkgs/misc/vscode-extensions/rust-analyzer/default.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ lib -, fetchFromGitHub -, vscode-utils -, jq -, rust-analyzer -, nodePackages -, moreutils -, esbuild -, pkg-config -, libsecret -, stdenv -, darwin -, setDefaultServerPath ? true -}: - -let - pname = "rust-analyzer"; - publisher = "matklad"; - - # Use the plugin version as in vscode marketplace, updated by update script. - inherit (vsix) version; - - releaseTag = "2021-11-29"; - - src = fetchFromGitHub { - owner = "rust-analyzer"; - repo = "rust-analyzer"; - rev = releaseTag; - sha256 = "sha256-vh7z8jupVxXPOko3sWUsOB7eji/7lKfwJ/CE3iw97Sw="; - }; - - build-deps = nodePackages."rust-analyzer-build-deps-../../misc/vscode-extensions/rust-analyzer/build-deps"; - # FIXME: Making a new derivation to link `node_modules` and run `npm run package` - # will cause a build failure. - vsix = build-deps.override { - src = "${src}/editors/code"; - outputs = [ "vsix" "out" ]; - - inherit releaseTag; - - nativeBuildInputs = [ - jq moreutils esbuild - # Required by `keytar`, which is a dependency of `vsce`. - pkg-config libsecret - ] ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.AppKit - darwin.apple_sdk.frameworks.Security - ]; - - # Follows https://github.com/rust-analyzer/rust-analyzer/blob/41949748a6123fd6061eb984a47f4fe780525e63/xtask/src/dist.rs#L39-L65 - postInstall = '' - jq ' - .version = $ENV.version | - .releaseTag = $ENV.releaseTag | - .enableProposedApi = false | - walk(del(.["$generated-start"]?) | del(.["$generated-end"]?)) - ' package.json | sponge package.json - - mkdir -p $vsix - # vsce ask for continue due to missing LICENSE.md - # Should be removed after https://github.com/rust-analyzer/rust-analyzer/commit/acd5c1f19bf7246107aaae7b6fe3f676a516c6d2 - echo y | npx vsce package -o $vsix/${pname}.zip - ''; - }; - -in -vscode-utils.buildVscodeExtension { - inherit version vsix; - name = "${pname}-${version}"; - src = "${vsix}/${pname}.zip"; - vscodeExtUniqueId = "${publisher}.${pname}"; - - nativeBuildInputs = lib.optionals setDefaultServerPath [ jq moreutils ]; - - preInstall = lib.optionalString setDefaultServerPath '' - jq '.contributes.configuration.properties."rust-analyzer.server.path".default = $s' \ - --arg s "${rust-analyzer}/bin/rust-analyzer" \ - package.json | sponge package.json - ''; - - meta = with lib; { - description = "An alternative rust language server to the RLS"; - homepage = "https://github.com/rust-analyzer/rust-analyzer"; - license = with licenses; [ mit asl20 ]; - maintainers = with maintainers; [ ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/misc/vscode-extensions/terraform/default.nix b/pkgs/misc/vscode-extensions/terraform/default.nix deleted file mode 100644 index e6e094bb1cb..00000000000 --- a/pkgs/misc/vscode-extensions/terraform/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, vscode-utils, terraform-ls }: -vscode-utils.buildVscodeMarketplaceExtension rec { - mktplcRef = { - name = "terraform"; - publisher = "hashicorp"; - version = "2.19.0"; - sha256 = "sha256-k/fcEJuELz0xkwivSrP6Nxtz861BLq1wR2ZDMXVrvkY="; - }; - - patches = [ ./fix-terraform-ls.patch ]; - - postPatch = '' - substituteInPlace out/serverPath.js --replace TERRAFORM-LS-PATH ${terraform-ls}/bin/terraform-ls - ''; - - meta = with lib; { - license = licenses.mit; - maintainers = with maintainers; [ rhoriguchi ]; - }; -} diff --git a/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch b/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch deleted file mode 100644 index e2dcd0b70aa..00000000000 --- a/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/out/serverPath.js b/out/serverPath.js -index fafa915..2e6d376 100644 ---- a/out/serverPath.js -+++ b/out/serverPath.js -@@ -18,7 +18,13 @@ exports.CUSTOM_BIN_PATH_OPTION_NAME = 'languageServer.pathToBinary'; - class ServerPath { - constructor(context) { - this.context = context; -- this.customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME); -+ -+ const customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME); -+ if (!customBinPath) { -+ this.customBinPath = 'TERRAFORM-LS-PATH'; -+ } else { -+ this.customBinPath = customBinPath; -+ } - } - installPath() { - return path.join(this.context.globalStorageUri.fsPath, INSTALL_FOLDER_NAME); diff --git a/pkgs/misc/vscode-extensions/updateSettings.nix b/pkgs/misc/vscode-extensions/updateSettings.nix deleted file mode 100644 index 443b4093027..00000000000 --- a/pkgs/misc/vscode-extensions/updateSettings.nix +++ /dev/null @@ -1,39 +0,0 @@ -# Updates the vscode setting file base on a nix expression -# should run from the workspace root. -{ writeShellScriptBin -, lib -, jq -}: -##User Input -{ settings ? {} -# if marked as true will create an empty json file if does not exist -, createIfDoesNotExists ? true -, vscodeSettingsFile ? ".vscode/settings.json" -, userSettingsFolder ? "" -, symlinkFromUserSetting ? false -}: -let - - updateVSCodeSettingsCmd = '' - ( - echo 'updateSettings.nix: Updating ${vscodeSettingsFile}...' - oldSettings=$(cat ${vscodeSettingsFile}) - echo $oldSettings' ${builtins.toJSON settings}' | ${jq}/bin/jq -s add > ${vscodeSettingsFile} - )''; - - createEmptySettingsCmd = ''mkdir -p .vscode && echo "{}" > ${vscodeSettingsFile}''; - fileName = builtins.baseNameOf vscodeSettingsFile; - symlinkFromUserSettingCmd = lib.optionalString symlinkFromUserSetting - '' && mkdir -p "${userSettingsFolder}" && ln -sfv "$(pwd)/${vscodeSettingsFile}" "${userSettingsFolder}/" ''; -in - - writeShellScriptBin ''vscodeNixUpdate-${lib.removeSuffix ".json" (fileName)}'' - (lib.optionalString (settings != {}) - (if createIfDoesNotExists then '' - [ ! -f "${vscodeSettingsFile}" ] && ${createEmptySettingsCmd} - ${updateVSCodeSettingsCmd} ${symlinkFromUserSettingCmd} - '' - else ''[ -f "${vscodeSettingsFile}" ] && ${updateVSCodeSettingsCmd} ${symlinkFromUserSettingCmd} - '' - ) - ) diff --git a/pkgs/misc/vscode-extensions/updateSettingsTest.nix b/pkgs/misc/vscode-extensions/updateSettingsTest.nix deleted file mode 100644 index 097b9cad166..00000000000 --- a/pkgs/misc/vscode-extensions/updateSettingsTest.nix +++ /dev/null @@ -1,6 +0,0 @@ -with import {}; -callPackage (import ./updateSettings.nix) {} { - settings = { - a = "fdsdf"; - }; -} diff --git a/pkgs/misc/vscode-extensions/update_installed_exts.sh b/pkgs/misc/vscode-extensions/update_installed_exts.sh deleted file mode 100755 index 44cf506b3ab..00000000000 --- a/pkgs/misc/vscode-extensions/update_installed_exts.sh +++ /dev/null @@ -1,90 +0,0 @@ -#! /usr/bin/env nix-shell -#! nix-shell -i bash -p curl jq unzip -# shellcheck shell=bash -set -eu -o pipefail - -# can be added to your configuration with the following command and snippet: -# $ ./pkgs/misc/vscode-extensions/update_installed_exts.sh > extensions.nix -# -# packages = with pkgs; -# (vscode-with-extensions.override { -# vscodeExtensions = map -# (extension: vscode-utils.buildVscodeMarketplaceExtension { -# mktplcRef = { -# inherit (extension) name publisher version sha256; -# }; -# }) -# (import ./extensions.nix).extensions; -# }) -# ] - -# Helper to just fail with a message and non-zero exit code. -function fail() { - echo "$1" >&2 - exit 1 -} - -# Helper to clean up after ourselves if we're killed by SIGINT. -function clean_up() { - TDIR="${TMPDIR:-/tmp}" - echo "Script killed, cleaning up tmpdirs: $TDIR/vscode_exts_*" >&2 - rm -Rf "$TDIR/vscode_exts_*" -} - -function get_vsixpkg() { - N="$1.$2" - - # Create a tempdir for the extension download. - EXTTMP=$(mktemp -d -t vscode_exts_XXXXXXXX) - - URL="https://$1.gallery.vsassets.io/_apis/public/gallery/publisher/$1/extension/$2/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" - - # Quietly but delicately curl down the file, blowing up at the first sign of trouble. - curl --silent --show-error --retry 3 --fail -X GET -o "$EXTTMP/$N.zip" "$URL" - # Unpack the file we need to stdout then pull out the version - VER=$(jq -r '.version' <(unzip -qc "$EXTTMP/$N.zip" "extension/package.json")) - # Calculate the SHA - SHA=$(nix-hash --flat --base32 --type sha256 "$EXTTMP/$N.zip") - - # Clean up. - rm -Rf "$EXTTMP" - # I don't like 'rm -Rf' lurking in my scripts but this seems appropriate. - - cat <<-EOF - { - name = "$2"; - publisher = "$1"; - version = "$VER"; - sha256 = "$SHA"; - } -EOF -} - -# See if we can find our `code` binary somewhere. -if [ $# -ne 0 ]; then - CODE=$1 -else - CODE=$(command -v code || command -v codium) -fi - -if [ -z "$CODE" ]; then - # Not much point continuing. - fail "VSCode executable not found" -fi - -# Try to be a good citizen and clean up after ourselves if we're killed. -trap clean_up SIGINT - -# Begin the printing of the nix expression that will house the list of extensions. -printf '{ extensions = [\n' - -# Note that we are only looking to update extensions that are already installed. -for i in $($CODE --list-extensions) -do - OWNER=$(echo "$i" | cut -d. -f1) - EXT=$(echo "$i" | cut -d. -f2) - - get_vsixpkg "$OWNER" "$EXT" -done -# Close off the nix expression. -printf '];\n}' diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json b/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json deleted file mode 100644 index 2e5670d3039..00000000000 --- a/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "vscode-lldb", - "version": "1.6.8", - "dependencies": { - "string-argv": "^0.3.1", - "yaml": "^1.10.0", - "yauzl": "^2.10.0", - "@types/vscode": "^1.31.0", - "@types/node": "^8.10.50", - "@types/mocha": "^7.0.1", - "@types/yauzl": "^2.9.0", - "typescript": "^4.2.4", - "mocha": "^8.4.0", - "source-map-support": "^0.5.12", - "memory-streams": "^0.1.3", - "vscode-debugprotocol": "^1.47.0", - "vscode-debugadapter-testsupport": "^1.47.0", - "vsce": "=1.88.0", - "webpack": "^5.37.1", - "webpack-cli": "^4.7.0", - "ts-loader": "^8.0.0" - } -} diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch b/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch deleted file mode 100644 index fb55816b942..00000000000 --- a/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 37745b5..cad11a0 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -16,13 +16,6 @@ endif() - set(VERSION "${VERSION}${VERSION_SUFFIX}") - message("Version ${VERSION}") - --set(LLDB_PACKAGE $ENV{LLDB_PACKAGE} CACHE PATH "Zip archive containing LLDB files") --if (LLDB_PACKAGE) -- message("Using LLDB_PACKAGE=${LLDB_PACKAGE}") --else() -- message(FATAL_ERROR "LLDB_PACKAGE not set." ) --endif() -- - set(TEST_TIMEOUT 5000 CACHE STRING "Test timeout [ms]") - - # General OS-specific definitions -@@ -87,16 +80,6 @@ configure_file(package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY) - configure_file(webpack.config.js ${CMAKE_CURRENT_BINARY_DIR}/webpack.config.js @ONLY) - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - --# Run 'npm install' --execute_process( -- COMMAND ${NPM} ci # like install, but actually respects package-lock file. -- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} -- RESULT_VARIABLE Result --) --if (NOT ${Result} EQUAL 0) -- message(FATAL_ERROR "npm intall failed: ${Result}") --endif() -- - # Copy it back, so we can commit the lock file. - file(COPY ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}) - - diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/default.nix b/pkgs/misc/vscode-extensions/vscode-lldb/default.nix deleted file mode 100644 index 7f20d0e7191..00000000000 --- a/pkgs/misc/vscode-extensions/vscode-lldb/default.nix +++ /dev/null @@ -1,104 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, makeWrapper, callPackage -, nodePackages, cmake, nodejs, unzip, python3 -}: -assert lib.versionAtLeast python3.version "3.5"; -let - publisher = "vadimcn"; - pname = "vscode-lldb"; - version = "1.6.10"; - - vscodeExtUniqueId = "${publisher}.${pname}"; - - src = fetchFromGitHub { - owner = "vadimcn"; - repo = "vscode-lldb"; - rev = "v${version}"; - sha256 = "sha256-4PM/818UFHRZekfbdhS/Rz0Pu6HOjJEldi4YuBWECnI="; - }; - - lldb = callPackage ./lldb.nix {}; - - adapter = rustPlatform.buildRustPackage { - pname = "${pname}-adapter"; - inherit version src; - - # It will pollute the build environment of `buildRustPackage`. - cargoPatches = [ ./reset-cargo-config.patch ]; - - cargoSha256 = "sha256-Ch1X2vN+p7oCqSs/GIu5IzG+pcSKmQ+VwP2T8ycRhos="; - - nativeBuildInputs = [ makeWrapper ]; - - buildAndTestSubdir = "adapter"; - - buildFeatures = [ "weak-linkage" ]; - - cargoBuildFlags = [ - "--lib" - "--bin=codelldb" - ]; - - # Tests are linked to liblldb but it is not available here. - doCheck = false; - }; - - nodeDeps = nodePackages."vscode-lldb-build-deps-../../misc/vscode-extensions/vscode-lldb/build-deps"; - -in stdenv.mkDerivation { - pname = "vscode-extension-${publisher}-${pname}"; - inherit src version vscodeExtUniqueId; - - installPrefix = "share/vscode/extensions/${vscodeExtUniqueId}"; - - nativeBuildInputs = [ cmake nodejs unzip makeWrapper ]; - - patches = [ ./cmake-build-extension-only.patch ]; - - postConfigure = '' - cp -r ${nodeDeps}/lib/node_modules/vscode-lldb/{node_modules,package-lock.json} . - ''; - - cmakeFlags = [ - # Do not append timestamp to version. - "-DVERSION_SUFFIX=" - ]; - makeFlags = [ "vsix_bootstrap" ]; - - installPhase = '' - ext=$out/$installPrefix - runHook preInstall - - unzip ./codelldb-bootstrap.vsix 'extension/*' -d ./vsix-extracted - - mkdir -p $ext/{adapter,formatters} - mv -t $ext vsix-extracted/extension/* - cp -t $ext/adapter ${adapter}/{bin,lib}/* ../adapter/*.py - wrapProgram $ext/adapter/codelldb \ - --set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server" - cp -t $ext/formatters ../formatters/*.py - ln -s ${lldb.lib} $ext/lldb - # Mark that all components are installed. - touch $ext/platform.ok - - runHook postInstall - ''; - - # `adapter` will find python binary and libraries at runtime. - postFixup = '' - wrapProgram $out/$installPrefix/adapter/codelldb \ - --prefix PATH : "${python3}/bin" \ - --prefix LD_LIBRARY_PATH : "${python3}/lib" - ''; - - passthru = { - inherit lldb adapter; - }; - - meta = with lib; { - description = "A native debugger extension for VSCode based on LLDB"; - homepage = "https://github.com/vadimcn/vscode-lldb"; - license = with licenses; [ mit ]; - maintainers = with maintainers; [ nigelgbanks ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix b/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix deleted file mode 100644 index e04e9ad0b5b..00000000000 --- a/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix +++ /dev/null @@ -1,23 +0,0 @@ -# Patched lldb for Rust language support. -{ lldb_12, fetchFromGitHub }: -let - llvmSrc = fetchFromGitHub { - owner = "vadimcn"; - repo = "llvm-project"; - rev = "f2e9ff34256cd8c6feaf14359f88ad3f538ed687"; - sha256 = "sha256-5UsCBu3rtt+l2HZiCswoQJPPh8T6y471TBF4AypdF9I="; - }; -in lldb_12.overrideAttrs (oldAttrs: { - src = "${llvmSrc}/lldb"; - - passthru = (oldAttrs.passthru or {}) // { - inherit llvmSrc; - }; - - doInstallCheck = true; - postInstallCheck = (oldAttrs.postInstallCheck or "") + '' - versionOutput="$($out/bin/lldb --version)" - echo "'lldb --version' returns: $versionOutput" - echo "$versionOutput" | grep -q 'rust-enabled' - ''; -}) diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch b/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch deleted file mode 100644 index e95df0a9cef..00000000000 --- a/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/.cargo/config b/.cargo/config -index c3c75e4..e69de29 100644 ---- a/.cargo/config -+++ b/.cargo/config -@@ -1,14 +0,0 @@ --[build] --target-dir = "build/target" -- --[target.armv7-unknown-linux-gnueabihf] --rustflags = [ -- "-C", "link-arg=-fuse-ld=lld", -- "-C", "link-arg=--target=armv7-unknown-linux-gnueabihf", --] -- --[target.aarch64-unknown-linux-gnu] --rustflags = [ -- "-C", "link-arg=-fuse-ld=lld", -- "-C", "link-arg=--target=aarch64-unknown-linux-gnu", --] diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/update.sh b/pkgs/misc/vscode-extensions/vscode-lldb/update.sh deleted file mode 100755 index 2fe0cc5cf29..00000000000 --- a/pkgs/misc/vscode-extensions/vscode-lldb/update.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p jq nix-prefetch -set -eo pipefail -cd "$(dirname "${BASH_SOURCE[0]}")" -if [[ $# -ne 1 ]]; then - echo "Usage: ./update.sh " - exit 1 -fi - -echo " -FIXME: This script doesn't update patched lldb. Please manually check branches -of https://github.com/vadimcn/llvm-project and update lldb with correct version of LLVM. -" - -nixpkgs=../../../.. -nixFile=./default.nix -owner=vadimcn -repo=vscode-lldb -version="$1" - -sed -E 's/\bversion = ".*?"/version = "'$version'"/' --in-place "$nixFile" -srcHash=$(nix-prefetch fetchFromGitHub --owner vadimcn --repo vscode-lldb --rev "v$version") -sed -E 's#\bsha256 = ".*?"#sha256 = "'$srcHash'"#' --in-place "$nixFile" -cargoHash=$(nix-prefetch "{ sha256 }: (import $nixpkgs {}).vscode-extensions.vadimcn.vscode-lldb.adapter.cargoDeps.overrideAttrs (_: { outputHash = sha256; })") -sed -E 's#\bcargoSha256 = ".*?"#cargoSha256 = "'$cargoHash'"#' --in-place "$nixFile" - -src="$(nix-build $nixpkgs -A vscode-extensions.vadimcn.vscode-lldb.src --no-out-link)" -oldDeps="$(jq '.dependencies' build-deps/package.json)" -newDeps="$(jq '.dependencies + .devDependencies' "$src/package.json")" -jq '{ name, version: $version, dependencies: (.dependencies + .devDependencies) }' \ - --arg version "$version" \ - "$src/package.json" \ - > build-deps/package.json - -if [[ "$oldDeps" == "$newDeps" ]]; then - echo "Dependencies not changed" - sed '/"vscode-lldb-build-deps-/,+3 s/version = ".*"/version = "'"$version"'"/' \ - --in-place "$nixpkgs/pkgs/development/node-packages/node-packages.nix" -else - echo "Dependencies changed" - # Regenerate nodePackages. - cd "$nixpkgs/pkgs/development/node-packages" - exec ./generate.sh -fi diff --git a/pkgs/misc/vscode-extensions/vscode-utils.nix b/pkgs/misc/vscode-extensions/vscode-utils.nix deleted file mode 100644 index 49b730361af..00000000000 --- a/pkgs/misc/vscode-extensions/vscode-utils.nix +++ /dev/null @@ -1,100 +0,0 @@ -{ stdenv, lib, buildEnv, writeShellScriptBin, fetchurl, vscode, unzip, jq }: -let - buildVscodeExtension = a@{ - name, - src, - # Same as "Unique Identifier" on the extension's web page. - # For the moment, only serve as unique extension dir. - vscodeExtUniqueId, - configurePhase ? '' - runHook preConfigure - runHook postConfigure - '', - buildPhase ?'' - runHook preBuild - runHook postBuild - '', - dontPatchELF ? true, - dontStrip ? true, - nativeBuildInputs ? [], - ... - }: - stdenv.mkDerivation ((removeAttrs a [ "vscodeExtUniqueId" ]) // { - - name = "vscode-extension-${name}"; - - inherit vscodeExtUniqueId; - inherit configurePhase buildPhase dontPatchELF dontStrip; - - installPrefix = "share/vscode/extensions/${vscodeExtUniqueId}"; - - nativeBuildInputs = [ unzip ] ++ nativeBuildInputs; - - installPhase = '' - - runHook preInstall - - mkdir -p "$out/$installPrefix" - find . -mindepth 1 -maxdepth 1 | xargs -d'\n' mv -t "$out/$installPrefix/" - - runHook postInstall - ''; - - }); - - fetchVsixFromVscodeMarketplace = mktplcExtRef: - fetchurl((import ./mktplcExtRefToFetchArgs.nix mktplcExtRef)); - - buildVscodeMarketplaceExtension = a@{ - name ? "", - src ? null, - vsix ? null, - mktplcRef, - ... - }: assert "" == name; assert null == src; - buildVscodeExtension ((removeAttrs a [ "mktplcRef" "vsix" ]) // { - name = "${mktplcRef.publisher}-${mktplcRef.name}-${mktplcRef.version}"; - src = if (vsix != null) - then vsix - else fetchVsixFromVscodeMarketplace mktplcRef; - vscodeExtUniqueId = "${mktplcRef.publisher}.${mktplcRef.name}"; - }); - - mktplcRefAttrList = [ - "name" - "publisher" - "version" - "sha256" - ]; - - mktplcExtRefToExtDrv = ext: - buildVscodeMarketplaceExtension ((removeAttrs ext mktplcRefAttrList) // { - mktplcRef = ext; - }); - - extensionFromVscodeMarketplace = mktplcExtRefToExtDrv; - extensionsFromVscodeMarketplace = mktplcExtRefList: - builtins.map extensionFromVscodeMarketplace mktplcExtRefList; - - vscodeWithConfiguration = import ./vscodeWithConfiguration.nix { - inherit lib extensionsFromVscodeMarketplace writeShellScriptBin; - vscodeDefault = vscode; - }; - - - vscodeExts2nix = import ./vscodeExts2nix.nix { - inherit lib writeShellScriptBin; - vscodeDefault = vscode; - }; - - vscodeEnv = import ./vscodeEnv.nix { - inherit lib buildEnv writeShellScriptBin extensionsFromVscodeMarketplace jq; - vscodeDefault = vscode; - }; -in -{ - inherit fetchVsixFromVscodeMarketplace buildVscodeExtension - buildVscodeMarketplaceExtension extensionFromVscodeMarketplace - extensionsFromVscodeMarketplace - vscodeWithConfiguration vscodeExts2nix vscodeEnv; -} diff --git a/pkgs/misc/vscode-extensions/vscodeEnv.nix b/pkgs/misc/vscode-extensions/vscodeEnv.nix deleted file mode 100644 index 7c58a4bdfb3..00000000000 --- a/pkgs/misc/vscode-extensions/vscodeEnv.nix +++ /dev/null @@ -1,86 +0,0 @@ -#Use vscodeWithConfiguration and vscodeExts2nix to create a vscode executable. When the executable exits, it updates the mutable extension file, which is imported when evaluated by Nix later. -{ lib -, buildEnv -, writeShellScriptBin -, extensionsFromVscodeMarketplace -, vscodeDefault -, jq -}: -##User input -{ vscode ? vscodeDefault -, nixExtensions ? [] -, vscodeExtsFolderName ? ".vscode-exts" -# will add to the command updateSettings (which will run on executing vscode) settings to override in settings.json file -, settings ? {} -, createSettingsIfDoesNotExists ? true -, launch ? {} -, createLaunchIfDoesNotExists ? true -# will add to the command updateKeybindings(which will run on executing vscode) keybindings to override in keybinding.json file -, keybindings ? {} -, createKeybindingsIfDoesNotExists ? true -, user-data-dir ? ''"''${TMP}''${name}"/vscode-data-dir'' -# if file exists will use it and import the extensions in it into this dervation else will use empty extensions list -# this file will be created/updated by vscodeExts2nix when vscode exists -, mutableExtensionsFile -}: -let - mutableExtensionsFilePath = toString mutableExtensionsFile; - mutableExtensions = if builtins.pathExists mutableExtensionsFile - then import mutableExtensionsFilePath else []; - vscodeWithConfiguration = import ./vscodeWithConfiguration.nix { - inherit lib writeShellScriptBin extensionsFromVscodeMarketplace; - vscodeDefault = vscode; - } - { - inherit nixExtensions mutableExtensions vscodeExtsFolderName user-data-dir; - }; - - updateSettings = import ./updateSettings.nix { inherit lib writeShellScriptBin jq; }; - userSettingsFolder = "${ user-data-dir }/User"; - - updateSettingsCmd = updateSettings { - settings = { - "extensions.autoCheckUpdates" = false; - "extensions.autoUpdate" = false; - "update.mode" = "none"; - } // settings; - inherit userSettingsFolder; - createIfDoesNotExists = createSettingsIfDoesNotExists; - symlinkFromUserSetting = (user-data-dir != ""); - }; - - updateLaunchCmd = updateSettings { - settings = launch; - createIfDoesNotExists = createLaunchIfDoesNotExists; - vscodeSettingsFile = ".vscode/launch.json"; - }; - - updateKeybindingsCmd = updateSettings { - settings = keybindings; - createIfDoesNotExists = createKeybindingsIfDoesNotExists; - vscodeSettingsFile = ".vscode/keybindings.json"; - inherit userSettingsFolder; - symlinkFromUserSetting = (user-data-dir != ""); - }; - - vscodeExts2nix = import ./vscodeExts2nix.nix { - inherit lib writeShellScriptBin; - vscodeDefault = vscodeWithConfiguration; - } - { - extensionsToIgnore = nixExtensions; - extensions = mutableExtensions; - }; - code = writeShellScriptBin "code" '' - ${updateSettingsCmd}/bin/vscodeNixUpdate-settings - ${updateLaunchCmd}/bin/vscodeNixUpdate-launch - ${updateKeybindingsCmd}/bin/vscodeNixUpdate-keybindings - ${vscodeWithConfiguration}/bin/code --wait "$@" - echo 'running vscodeExts2nix to update ${mutableExtensionsFilePath}...' - ${vscodeExts2nix}/bin/vscodeExts2nix > ${mutableExtensionsFilePath} - ''; -in -buildEnv { - name = "vscodeEnv"; - paths = [ code vscodeExts2nix updateSettingsCmd updateLaunchCmd updateKeybindingsCmd ]; -} diff --git a/pkgs/misc/vscode-extensions/vscodeEnvTest.nix b/pkgs/misc/vscode-extensions/vscodeEnvTest.nix deleted file mode 100644 index 19a9edbf1af..00000000000 --- a/pkgs/misc/vscode-extensions/vscodeEnvTest.nix +++ /dev/null @@ -1,11 +0,0 @@ -with import {}; -callPackage (import ./vscodeEnv.nix) { - extensionsFromVscodeMarketplace = vscode-utils.extensionsFromVscodeMarketplace; - vscodeDefault = vscode; -} { - mutableExtensionsFile = ./extensions.nix; - settings = { - a = "fdsdf"; - t = "test"; - }; -} diff --git a/pkgs/misc/vscode-extensions/vscodeExts2nix.nix b/pkgs/misc/vscode-extensions/vscodeExts2nix.nix deleted file mode 100644 index 58cbe663c90..00000000000 --- a/pkgs/misc/vscode-extensions/vscodeExts2nix.nix +++ /dev/null @@ -1,44 +0,0 @@ -# based on the passed vscode will stdout a nix expression with the installed vscode extensions -{ lib -, vscodeDefault -, writeShellScriptBin -}: - -##User input -{ vscode ? vscodeDefault -, extensionsToIgnore ? [] -# will use those extensions to get sha256 if still exists when executed. -, extensions ? [] -}: -let - mktplcExtRefToFetchArgs = import ./mktplcExtRefToFetchArgs.nix; -in -writeShellScriptBin "vscodeExts2nix" '' - echo '[' - - for line in $(${vscode}/bin/code --list-extensions --show-versions \ - ${lib.optionalString (extensionsToIgnore != []) '' - | grep -v -i '^\(${lib.concatMapStringsSep "\\|" (e : "${e.publisher}.${e.name}") extensionsToIgnore}\)' - ''} - ) ; do - [[ $line =~ ([^.]*)\.([^@]*)@(.*) ]] - name=''${BASH_REMATCH[2]} - publisher=''${BASH_REMATCH[1]} - version=''${BASH_REMATCH[3]} - - extensions="${lib.concatMapStringsSep "." (e : "${e.publisher}${e.name}@${e.sha256}") extensions}" - reCurrentExt=$publisher$name"@([^.]*)" - if [[ $extensions =~ $reCurrentExt ]]; then - sha256=''${BASH_REMATCH[1]} - else - sha256=$( - nix-prefetch-url "${(mktplcExtRefToFetchArgs {publisher = ''"$publisher"''; name = ''"$name"''; version = ''"$version"'';}).url}" 2> /dev/null - ) - fi - - echo "{ name = \"''${name}\"; publisher = \"''${publisher}\"; version = \"''${version}\"; sha256 = \"''${sha256}\"; }" - done - - - echo ']' -'' diff --git a/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix b/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix deleted file mode 100644 index 39479d7c2f2..00000000000 --- a/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix +++ /dev/null @@ -1,54 +0,0 @@ -# wrapper over vscode to control extensions per project (extensions folder will be created in execution path) -{ lib -, writeShellScriptBin -, extensionsFromVscodeMarketplace -, vscodeDefault -}: -## User input -{ vscode ? vscodeDefault -# extensions to be symlinked into the project's extensions folder -, nixExtensions ? [] -# extensions to be copied into the project's extensions folder -, mutableExtensions ? [] -, vscodeExtsFolderName ? ".vscode-exts" -, user-data-dir ? ''"''${TMP}vscodeWithConfiguration/vscode-data-dir"'' -}: -let - nixExtsDrvs = extensionsFromVscodeMarketplace nixExtensions; - mutExtsDrvs = extensionsFromVscodeMarketplace mutableExtensions; - mutableExtsPaths = lib.forEach mutExtsDrvs ( e: - { - origin = "${e}/share/vscode/extensions/${e.vscodeExtUniqueId}"; - target = ''${vscodeExtsFolderName}/${e.vscodeExtUniqueId}-${(lib.findSingle (ext: "${ext.publisher}.${ext.name}" == e.vscodeExtUniqueId) "" "m" mutableExtensions ).version}''; - } - ); - - #removed not defined extensions - rmExtensions = lib.optionalString (nixExtensions++mutableExtensions != []) '' - find ${vscodeExtsFolderName} -mindepth 1 -maxdepth 1 ${ - lib.concatMapStringsSep " " (e : "! -iname ${e.publisher}.${e.name} ") nixExtensions - + - lib.concatMapStringsSep " " (e : "! -iname ${e.publisher}.${e.name}-${e.version} ") mutableExtensions - } -exec rm -rf {} \; - ''; - #copy mutable extension out of the nix store - cpExtensions = '' - ${lib.concatMapStringsSep "\n" (e : "ln -sfn ${e}/share/vscode/extensions/* ${vscodeExtsFolderName}/") nixExtsDrvs} - ${lib.concatMapStringsSep "\n" (ePath : '' - if [ ! -d ${ePath.target} ]; then - cp -a ${ePath.origin} ${ePath.target} - chmod -R u+rwx ${ePath.target} - fi - '') mutableExtsPaths} - ''; -in - writeShellScriptBin "code" '' - if ! [[ "$@" =~ "--list-extension" ]]; then - mkdir -p "${vscodeExtsFolderName}" - ${rmExtensions} - ${cpExtensions} - fi - ${vscode}/bin/code --extensions-dir "${vscodeExtsFolderName}" ${ - lib.optionalString (user-data-dir != "") "--user-data-dir ${user-data-dir}" - } "$@" - '' diff --git a/pkgs/misc/vscode-extensions/wakatime/default.nix b/pkgs/misc/vscode-extensions/wakatime/default.nix deleted file mode 100644 index 9832b16f747..00000000000 --- a/pkgs/misc/vscode-extensions/wakatime/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib -, vscode-utils }: - -let - inherit (vscode-utils) buildVscodeMarketplaceExtension; -in - buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-wakatime"; - publisher = "WakaTime"; - version = "17.1.0"; - sha256 = "177q8angrn702pxrrpk1fzggzlnnaymq32v55qpjgjb74rhg4dzw"; - }; - - meta = with lib; { - description = '' - Visual Studio Code plugin for automatic time tracking and metrics generated - from your programming activity - ''; - license = licenses.bsd3; - }; - } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be3a38a94eb..3549325c258 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29561,11 +29561,11 @@ with pkgs; vscode-fhs = vscode.fhs; vscode-fhsWithPackages = vscode.fhsWithPackages; - vscode-with-extensions = callPackage ../applications/editors/vscode/with-extensions.nix {}; + vscode-with-extensions = callPackage ../applications/editors/vscode/with-extensions.nix { }; - vscode-utils = callPackage ../misc/vscode-extensions/vscode-utils.nix {}; + vscode-utils = callPackage ../applications/editors/vscode/extensions/vscode-utils.nix { }; - vscode-extensions = recurseIntoAttrs (callPackage ../misc/vscode-extensions {}); + vscode-extensions = recurseIntoAttrs (callPackage ../applications/editors/vscode/extensions { }); vscodium = callPackage ../applications/editors/vscode/vscodium.nix { }; vscodium-fhs = vscodium.fhs; -- cgit 1.4.1 From 2d98f7cff3813d46c18acfc31c6d3a53f47d8f13 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Thu, 17 Feb 2022 21:15:04 -0300 Subject: vscode: update the updaters! Now they use update-shell.nix auxiliar file. --- .../editors/vscode/extensions/vscode-lldb/update.sh | 8 +++++--- pkgs/applications/editors/vscode/update-shell.nix | 18 ++++++++++++++++++ pkgs/applications/editors/vscode/update-vscode.sh | 4 ++-- pkgs/applications/editors/vscode/update-vscodium.sh | 4 ++-- 4 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 pkgs/applications/editors/vscode/update-shell.nix diff --git a/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh b/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh index 2fe0cc5cf29..0dc38c6fdb7 100755 --- a/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh +++ b/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh @@ -1,5 +1,6 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p jq nix-prefetch +#! /usr/bin/env nix-shell +#! nix-shell ../../update-shell.nix -i bash + set -eo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" if [[ $# -ne 1 ]]; then @@ -12,7 +13,8 @@ FIXME: This script doesn't update patched lldb. Please manually check branches of https://github.com/vadimcn/llvm-project and update lldb with correct version of LLVM. " -nixpkgs=../../../.. +# Ideally, nixpkgs points to default.nix file of Nixpkgs official tree +nixpkgs=../../../../../.. nixFile=./default.nix owner=vadimcn repo=vscode-lldb diff --git a/pkgs/applications/editors/vscode/update-shell.nix b/pkgs/applications/editors/vscode/update-shell.nix new file mode 100644 index 00000000000..aa9488c217f --- /dev/null +++ b/pkgs/applications/editors/vscode/update-shell.nix @@ -0,0 +1,18 @@ +{ pkgs ? import ../../../.. { } }: + +# Ideally, pkgs points to default.nix file of Nixpkgs official tree +with pkgs; + +mkShell { + packages = [ + bash + curl + gawk + gnugrep + gnused + jq + nix + nix-prefetch + nix-prefetch-scripts + ]; +} diff --git a/pkgs/applications/editors/vscode/update-vscode.sh b/pkgs/applications/editors/vscode/update-vscode.sh index 709fbe1c751..67ec7a21b34 100755 --- a/pkgs/applications/editors/vscode/update-vscode.sh +++ b/pkgs/applications/editors/vscode/update-vscode.sh @@ -1,5 +1,5 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p curl jq gnused +#! /usr/bin/env nix-shell +#! nix-shell update-shell.nix -i bash # Update script for the vscode versions and hashes. # Usually doesn't need to be called by hand, diff --git a/pkgs/applications/editors/vscode/update-vscodium.sh b/pkgs/applications/editors/vscode/update-vscodium.sh index 79c6b497ecc..377068c0821 100755 --- a/pkgs/applications/editors/vscode/update-vscodium.sh +++ b/pkgs/applications/editors/vscode/update-vscodium.sh @@ -1,5 +1,5 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p curl gnugrep gnused gawk +#! /usr/bin/env nix-shell +#! nix-shell update-shell.nix -i bash # Update script for the vscode versions and hashes. # Usually doesn't need to be called by hand, -- cgit 1.4.1 From 38862374212fcd136bb2572cf3df11e90b5757ed Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Fri, 18 Feb 2022 08:24:16 -0300 Subject: vscode: Update .github/CODEOWNERS --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bfb6f91bc7c..a1cdb32c554 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -229,7 +229,7 @@ /pkgs/misc/vim-plugins @jonringer @softinio # VsCode Extensions -/pkgs/misc/vscode-extensions @jonringer +/pkgs/applications/editors/vscode/extensions @jonringer # Prometheus exporter modules and tests /nixos/modules/services/monitoring/prometheus/exporters.nix @WilliButz -- cgit 1.4.1