push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
{
lib,
vscode-utils,
gemini-cli,
}:
vscode-utils.buildVscodeExtension (finalAttrs: {
pname = "gemini-cli-vscode-ide-companion";
inherit (gemini-cli) version;
vscodeExtPublisher = "Google";
vscodeExtName = "gemini-cli-vscode-ide-companion";
vscodeExtUniqueId = "${finalAttrs.vscodeExtPublisher}.${finalAttrs.vscodeExtName}";
src = gemini-cli.overrideAttrs (oldAttrs: {
pname = "gemini-cli-vscode-ide-companion-vsix";
installPhase = ''
runHook preInstall
npm --workspace=gemini-cli-vscode-ide-companion run package -- --out $out
runHook postInstall
'';
});
unpackPhase = ''
runHook preUnpack
unzip $src
runHook postUnpack
'';
meta = {
description = "Enable Gemini CLI with direct access to your IDE workspace";
homepage = "https://github.com/google-gemini/gemini-cli";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=Google.gemini-cli-vscode-ide-companion";
license = lib.licenses.asl20;
sourceProvenance = with lib.sourceTypes; [ fromSource ];
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
};
})

View File

@@ -0,0 +1,42 @@
# Visual Studio Code Extensions
## Conventions for adding new extensions
* Extensions are named in the **lowercase** version of the extension's unique identifier which is found on the extension's marketplace page, and is the name under which the extension is installed by VSCode under `~/.vscode`.
Extension location should be: ${lib.strings.toLower mktplcRef.publisher}.${lib.string.toLower mktplcRef.name}
* When adding a new extension, place its definition in a `default.nix` file in a directory with the extension's ID (e.g. `publisher.extension-name/default.nix`) and refer to it in `./default.nix`, e.g. `publisher.extension-name = callPackage ./publisher.extension-name { };`.
* Currently `nixfmt-rfc-style` formatter is being used to format the VSCode extensions.
* Respect `alphabetical order` whenever adding extensions. On disorder, please, kindly open a PR re-establishing the order.
* Avoid [unnecessary](https://nix.dev/guides/best-practices.html#with-scopes) use of `with`, particularly `nested with`.
* Use `hash` instead of `sha256`.
* On `meta` field:
- add a `changelog`.
- `description` should mention it is a Visual Studio Code extension.
- `downloadPage` is the VSCode marketplace URL.
- `homepage` is the source-code URL.
- `maintainers`:
- optionally consider adding yourself as a maintainer to be notified of updates, breakages and help with upkeep.
- recommended format is:
- a `non-nested with`, such as: `with lib.maintainers; [ your-username ];`.
- maintainers are listed in alphabetical order.
- verify `license` in upstream.
* On commit messages:
- Naming convention for:
- Adding a new extension:
> vscode-extensions.publisher.extension-name: init at 1.2.3
>
> Release: https://github.com/owner/project/releases/tag/1.2.3
- Updating an extension:
> vscode-extensions.publisher.extension-name: 1.2.3 -> 2.3.4
>
> Release: https://github.com/owner/project/releases/tag/2.3.4
- Multiple extensions can be added in a single PR, but each extension requires its own commit.

View File

@@ -0,0 +1,22 @@
{ lib, vscode-utils }:
let
inherit (vscode-utils) buildVscodeMarketplaceExtension;
in
buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-wakatime";
publisher = "WakaTime";
version = "25.3.2";
hash = "sha256-xX1vejS8zoidcI6fnp7vvtSw4rMHIe2IF4JQJB5hvqs=";
};
meta = {
description = ''
Visual Studio Code plugin for automatic time tracking and metrics generated
from your programming activity
'';
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ cizniarova ];
};
}

View File

@@ -0,0 +1,158 @@
#!/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"
}
function make_trapped_tmpdir() {
tmpDir=$(mktemp -d)
trap rm_tmpdir 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 --extra-experimental-features nix-command 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'
}

View File

@@ -0,0 +1,20 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "arepl";
publisher = "almenon";
version = "3.0.0";
hash = "sha256-NadsB/6kUQ7/d9o3rUc7889jO+4MdvBhtyI4UUGpzqk=";
};
meta = {
description = "Preferred dark/light themes by John Papa";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=almenon.arepl";
homepage = "https://github.com/Almenon/AREPL-vscode";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.therobot2105 ];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension (finalAttrs: {
mktplcRef = {
name = "amazon-q-vscode";
publisher = "AmazonWebServices";
version = "1.98.0";
hash = "sha256-eSngVjKU74G7Gmqg3/wbYt8JZzBP5LtmegHIEXmaz70=";
};
meta = {
changelog = "https://github.com/aws/aws-toolkit-vscode/releases/tag/amazonq%2Fv${finalAttrs.version}";
description = "Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode";
homepage = "https://github.com/aws/aws-toolkit-vscode";
license = lib.licenses.asl20;
maintainers = [ ];
};
})

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "claude-code";
publisher = "anthropic";
version = "2.0.10";
hash = "sha256-wtqtjvU7HZZWUxRRN/H7I0lgCMRzGZy/Mu5s30ZbJ0g=";
};
meta = {
description = "Harness the power of Claude Code without leaving your IDE";
homepage = "https://docs.anthropic.com/s/claude-code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code";
license = lib.licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
vscode-utils,
httpyac,
}:
let
version = "6.16.7";
in
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-httpyac";
publisher = "anweber";
inherit version;
hash = "sha256-NAyVsEb3QBgq+cGWF03kjk2bQ8L5mulYYyIhIhjNVMQ=";
};
buildInputs = [ httpyac ];
meta = {
changelog = "https://github.com/AnWeber/vscode-httpyac/releases/tag/${version}";
description = "Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT, RabbitMQ and WebSocket requests directly within Visual Studio Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac";
homepage = "https://github.com/AnWeber/vscode-httpyac/";
license = lib.licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/package.json b/package.json
index 7ab70e8..2ebe541 100644
--- a/package.json
+++ b/package.json
@@ -437,7 +437,7 @@
},
"asciidoc.asciidoctorpdf_command": {
"type": "string",
- "default": "asciidoctor-pdf",
+ "default": "@ASCIIDOCTOR_PDF_BIN@",
"markdownDescription": "%asciidoc.asciidoctorpdf_command.desc%",
"markdownDeprecationMessage": "%asciidoc.asciidoctorpdf_command.deprecationMessage%",
"scope": "resource"

View File

@@ -0,0 +1,28 @@
{
asciidoctor,
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "asciidoctor-vscode";
publisher = "asciidoctor";
version = "3.4.2";
hash = "sha256-HG3y7999xeE1erQZCnBgUPj/aC0Kwyn20PEZR9gKrxY=";
};
patches = [
./commands-abspath.patch
];
postPatch = ''
substituteInPlace package.json \
--replace-fail "@ASCIIDOCTOR_PDF_BIN@" \
"${asciidoctor}/bin/asciidoctor-pdf"
'';
meta = {
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
jq,
moreutils,
millet,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "Millet";
publisher = "azdavis";
version = "0.14.9";
hash = "sha256-gRXS+i02XpJSveCTq6KK8utc32JNPE+I3vSEyCqOzaE=";
};
nativeBuildInputs = [
jq
moreutils
];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."millet.server.path".default = "${millet}/bin/millet-ls"' package.json | sponge package.json
'';
meta = {
description = "Standard ML support for VS Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=azdavis.millet";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.smasher164 ];
};
}

View File

@@ -0,0 +1,27 @@
{
vscode-utils,
jq,
lib,
moreutils,
nixpkgs-fmt,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "nixpkgs-fmt";
publisher = "B4dM4n";
version = "0.0.1";
hash = "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 = {
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
clojure-lsp,
jq,
moreutils,
vscode-utils,
vscode-extension-update-script,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "calva";
publisher = "betterthantomorrow";
version = "2.0.536";
hash = "sha256-Q6T8Ab8kwOjdFM63SjTNEOgd+a6fL1PRGRredHzwg7U=";
};
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
'';
passthru.updateScript = vscode-extension-update-script {
extraArgs = [
"--override-filename"
"pkgs/applications/editors/vscode/extensions/betterthantomorrow.calva/default.nix"
];
};
meta.license = lib.licenses.mit;
}

View File

@@ -0,0 +1,18 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "color-info";
publisher = "bierner";
version = "0.7.2";
hash = "sha256-Bf0thdt4yxH7OsRhIXeqvaxD1tbHTrUc4QJcju7Hv90=";
};
meta = {
description = "VSCode Extension that provides additional information about css colors";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=bierner.color-info";
homepage = "https://github.com/mattbierner/vscode-color-info";
changelog = "https://marketplace.visualstudio.com/items/bierner.color-info/changelog";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.timon ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
vscode-utils,
jq,
biome,
moreutils,
vscode-extension-update-script,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "biome";
publisher = "biomejs";
version = "2025.7.41733";
hash = "sha256-wWyLIjNOBjIe72ed+wwfQWGH7Vzuea/0Xux0XJkhAkY=";
};
postInstall = ''
cd "$out/$installPrefix"
${lib.getExe jq} '.contributes.configuration.properties."biome.lsp.bin".oneOf[0].default = "${lib.getExe biome}"' package.json | ${lib.getExe' moreutils "sponge"} package.json
'';
passthru.updateScript = vscode-extension-update-script {
extraArgs = [ "--pre-release" ];
};
meta = {
changelog = "https://github.com/biomejs/biome-vscode/blob/main/CHANGELOG.md";
description = "Biome LSP extension for Visual Studio Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=biomejs.biome";
homepage = "https://github.com/biomejs/biome-vscode";
license = with lib.licenses; [
mit
# or
asl20
];
maintainers = [ ];
};
}

View File

@@ -0,0 +1,19 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "blueprint-gtk";
publisher = "bodil";
version = "0.2.0";
hash = "sha256-A4H/o/HsjQKKee46VZJsjY7EB+1iOm4RWxHKcRLmkEY=";
};
meta = {
description = "Gtk Blueprint language support";
license = lib.licenses.lgpl3;
downloadPage = "https://marketplace.visualstudio.com/items?itemName=bodil.blueprint-gtk";
maintainers = [ lib.maintainers.lyndeno ];
};
}

View File

@@ -0,0 +1,20 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "language-hugo-vscode";
publisher = "budparr";
version = "1.3.1";
hash = "sha256-9dp8/gLAb8OJnmsLVbOAKAYZ5whavPW2Ak+WhLqEbJk=";
};
meta = {
description = "Adds syntax highlighting and snippets to Hugo files in VS Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.ohheyrj ];
};
}

View File

@@ -0,0 +1,17 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "solargraph";
publisher = "castwide";
version = "0.25.0";
hash = "sha256-5SmCkHGCS8dYfdSm3NRk091jH44m+7kkj+VL84YKM4g=";
};
meta = {
description = "Ruby language server featuring code completion, intellisense, and inline documentation";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=castwide.solargraph";
homepage = "https://github.com/castwide/vscode-solargraph";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.bbenno ];
};
}

View File

@@ -0,0 +1,64 @@
{
stdenvNoCC,
lib,
vscode-utils,
ruff,
vscode-extension-update-script,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef =
let
sources = {
"x86_64-linux" = {
arch = "linux-x64";
hash = "sha256-7tP5hFK1ohPN143Vwt6XJxk2mOXURpD7k95MRcMOCkY=";
};
"x86_64-darwin" = {
arch = "darwin-x64";
hash = "sha256-PhwYpFSeZU/00JyQ+BpVbqlmsgfJgsGsbfnBGZ5WrnA=";
};
"aarch64-linux" = {
arch = "linux-arm64";
hash = "sha256-GS9h2PkVjhButVrug7A7gx1qwLqFUI5tv/b++vhSetM=";
};
"aarch64-darwin" = {
arch = "darwin-arm64";
hash = "sha256-Twr0WcxZ4x9/85FyBHbzTKzCzZzamGKyX3yolql9l90=";
};
};
in
{
name = "ruff";
publisher = "charliermarsh";
version = "2025.26.0";
}
// sources.${stdenvNoCC.hostPlatform.system}
or (throw "Unsupported system ${stdenvNoCC.hostPlatform.system}");
postInstall = ''
test -x "$out/$installPrefix/bundled/libs/bin/ruff" || {
echo "Replacing the bundled ruff binary failed, because 'bundled/libs/bin/ruff' is missing."
echo "Update the package to the match the new path/behavior."
exit 1
}
ln -sf ${lib.getExe ruff} "$out/$installPrefix/bundled/libs/bin/ruff"
'';
passthru.updateScript = vscode-extension-update-script { };
meta = {
license = lib.licenses.mit;
changelog = "https://marketplace.visualstudio.com/items/charliermarsh.ruff/changelog";
description = "Visual Studio Code extension with support for the Ruff linter";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff";
homepage = "https://github.com/astral-sh/ruff-vscode";
platforms = [
"aarch64-linux"
"aarch64-darwin"
"x86_64-linux"
"x86_64-darwin"
];
maintainers = [ lib.maintainers.azd325 ];
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
vscode-utils,
callPackage,
}:
let
extVersion = "1.62.0";
rescript-editor-analysis = callPackage ./rescript-editor-analysis.nix { };
# Ensure the versions match
version =
if rescript-editor-analysis.version == extVersion then
rescript-editor-analysis.version
else
throw "analysis and extension versions must match";
arch =
if stdenv.hostPlatform.isLinux then
"linux"
else if stdenv.hostPlatform.isDarwin then
"darwin"
else
throw "Unsupported system: ${stdenv.system}";
analysisDir = "server/analysis_binaries/${arch}";
in
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "rescript-vscode";
publisher = "chenglou92";
inherit version;
hash = "sha256-yUAhysTM9FXo9ZAzrto+tnjnofIUEQAGBg3tjIainrY=";
};
# For rescript-language-server
passthru.rescript-editor-analysis = rescript-editor-analysis;
strictDeps = true;
postPatch = ''
rm -r ${analysisDir}
ln -s ${rescript-editor-analysis}/bin ${analysisDir}
'';
meta = {
description = "Official VSCode plugin for ReScript";
homepage = "https://github.com/rescript-lang/rescript-vscode";
maintainers = [
lib.maintainers.dlip
lib.maintainers.jayesh-bhoot
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
fetchFromGitHub,
nix-update-script,
ocamlPackages,
}:
ocamlPackages.buildDunePackage rec {
pname = "analysis";
version = "1.62.0";
minimalOCamlVersion = "4.10";
src = fetchFromGitHub {
owner = "rescript-lang";
repo = "rescript-vscode";
tag = version;
hash = "sha256-Tox5Qq0Kpqikac90sQww2cGr9RHlXnVy7GMnRA18CoA=";
};
strictDeps = true;
nativeBuildInputs = [
ocamlPackages.cppo
];
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"([0-9]+\.[0-9]+\.[0-9]+)"
];
};
meta = {
description = "Analysis binary for the ReScript VSCode plugin";
homepage = "https://github.com/rescript-lang/rescript-vscode";
changelog = "https://github.com/rescript-lang/rescript-vscode/releases/tag/${version}";
maintainers = with lib.maintainers; [
dlip
jayesh-bhoot
RossSmyth
];
license = lib.licenses.mit;
mainProgram = "rescript-editor-analysis";
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
vscode-utils,
jq,
moreutils,
pandoc,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-pandoc";
publisher = "chrischinchilla";
version = "0.6.2";
hash = "sha256-d2nVjVTwvVSQXnhTdqv5gLV44L6FWGbHGZtCplbUQz4=";
};
nativeBuildInputs = [
jq
moreutils
];
postInstall = ''
jq '.contributes.configuration.properties."pandoc.executable".default = "${lib.getExe pandoc}"' $out/$installPrefix/package.json | sponge $out/$installPrefix/package.json
'';
meta = {
description = "Converts Markdown files to pdf, docx, or html files using pandoc";
homepage = "https://github.com/ChrisChinchilla/vscode-pandoc#readme";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pandapip1 ];
};
}

View File

@@ -0,0 +1,33 @@
{
graphviz,
jre,
lib,
makeWrapper,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension rec {
mktplcRef = {
name = "context-mapper-vscode-extension";
publisher = "contextmapper";
version = "6.12.0";
hash = "sha256-iGaVipNvx6J3NgZ2KbBJOSVCwG+lr25u7mfMCY4yB18=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ graphviz ];
postInstall = ''
wrapProgram $out/share/vscode/extensions/contextmapper.context-mapper-vscode-extension/lsp/bin/context-mapper-lsp \
--set JAVA_HOME "${jre}"
'';
meta = {
description = "VSCode extension for Context Mapper";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=${mktplcRef.publisher}.${mktplcRef.name}";
homepage = "https://github.com/ContextMapper/vscode-extension";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.rhoriguchi ];
};
}

View File

@@ -0,0 +1,55 @@
{
autoPatchelfHook,
lib,
stdenv,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef =
let
sources = {
"x86_64-linux" = {
arch = "linux-x64";
hash = "sha256-jhzV5mDEwnHPcCaH/ZF/nLPTYZJlOEJkoaPcTg4+uU8=";
};
"x86_64-darwin" = {
arch = "darwin-x64";
hash = "sha256-nmT7hWHqmukyomTHIVM6k+bw0qgeeaehDNngiQgKid8=";
};
"aarch64-linux" = {
arch = "linux-arm64";
hash = "sha256-suJ/my6dovvxN2BdQKEbw8HeBi6o9WjPe/y9Uttq1QI=";
};
"aarch64-darwin" = {
arch = "darwin-arm64";
hash = "sha256-9+bCE3d6bNeVHnXNrJkWpK3UeVhy7cQrwYvSJ66Oufw=";
};
};
in
{
name = "continue";
publisher = "Continue";
version = "1.2.6";
}
// sources.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
meta = {
changelog = "https://marketplace.visualstudio.com/items/Continue.continue";
description = "Open-source AI code assistant";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=Continue.continue";
homepage = "https://github.com/continuedev/continue";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
raroh73
flacks
];
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-eslint";
publisher = "dbaeumer";
version = "3.0.16";
hash = "sha256-UxD07bouMK8nuysh5TAV7ZVhkLiOV6R1qfvVZcXB2Hc=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/dbaeumer.vscode-eslint/changelog";
description = "Integrates ESLint JavaScript into VS Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint";
homepage = "https://github.com/Microsoft/vscode-eslint";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.datafoo ];
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "adjust-heading-level";
publisher = "dendron";
version = "0.1.0";
hash = "sha256-u50RJ7ETVFUC43mp94VJsR931b9REBaTyRhZE7muoLw=";
};
meta = {
description = "VSCode extension to adjust the heading level of the selected text";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=dendron.adjust-heading-level";
homepage = "https://github.com/kevinslin/adjust-heading-level";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.ivyfanchiang ];
};
}

View File

@@ -0,0 +1,17 @@
{ lib, vscode-utils, ... }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "dendron-paste-image";
publisher = "dendron";
version = "1.1.3";
hash = "sha256-nnaHXQAOEblQRKqbDIsuTVrdh3BlDnWJGy9ai2bv02c=";
};
meta = {
description = "Paste images directly from your clipboard to markdown/asciidoc(or other file)";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=dendron.dendron-paste-image";
homepage = "https://github.com/dendronhq/dendron-paste-image";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.ivyfanchiang ];
};
}

View File

@@ -0,0 +1,17 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "dendron-snippet-maker";
publisher = "dendron";
version = "0.1.6";
hash = "sha256-KOIbAt6EjqRGaqOlCV+HO9phR4tk2KV/+FMCefCKN+8=";
};
meta = {
description = "Easily create markdown snippets. Used in Dendron but can also be used standalone";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=dendron.dendron-snippet-maker";
homepage = "https://github.com/dendronhq/easy-snippet-maker";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.ivyfanchiang ];
};
}

View File

@@ -0,0 +1,18 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "dendron";
publisher = "dendron";
version = "0.124.0";
hash = "sha256-/hxgmmiMUfBtPt5BcuNvtXs3LzDmPwDuUOyDf2udHws=";
};
meta = {
changelog = "https://github.com/dendronhq/dendron/blob/master/CHANGELOG.md";
description = "Personal knowledge management (PKM) tool that grows as you do";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=dendron.dendron";
homepage = "https://www.dendron.so/";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.ivyfanchiang ];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
...
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "basedpyright";
publisher = "detachhead";
version = "1.31.6";
hash = "sha256-kYy3rpDhyE8n0aBRE8tUYz9Ayvh0kzEDmHLclF9pBcc=";
};
meta = {
changelog = "https://github.com/detachhead/basedpyright/releases";
description = "VS Code static type checking for Python (but based)";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=detachhead.basedpyright";
homepage = "https://docs.basedpyright.com/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.hasnep ];
};
}

View File

@@ -0,0 +1,48 @@
{
stdenv,
lib,
vscode-utils,
}:
let
supported = {
x86_64-linux = {
hash = "sha256-2m1hVQ497zQs2pmk+F+5thO4cz7dP4dDEPznPBqKfX0=";
arch = "linux-x64";
};
x86_64-darwin = {
hash = "sha256-U2BcDUiper4chL8rF4ZUSos7erfXaq1LNqYYsRe2GDk=";
arch = "darwin-x64";
};
aarch64-linux = {
hash = "sha256-qYdYmPZPlf++cJWLbhvqeO0uePbAJE4hL2bVYlKbk0c=";
arch = "linux-arm64";
};
aarch64-darwin = {
hash = "sha256-oN3CWc/OLbeuyKfdPoh26yUQzH3d6YfpxacByWM43qk=";
arch = "darwin-arm64";
};
};
base =
supported.${stdenv.hostPlatform.system}
or (throw "unsupported platform ${stdenv.hostPlatform.system}");
in
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = base // {
publisher = "docker";
name = "docker";
version = "0.17.0";
};
meta = {
description = "Official Docker DX (Developer Experience) extension. Edit smarter, ship faster with an enhanced Docker-development experience.";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=docker.docker";
homepage = "https://github.com/docker/vscode-extension#readme";
changelog = "https://marketplace.visualstudio.com/items/docker.docker/changelog";
license = lib.licenses.asl20;
platforms = builtins.attrNames supported;
maintainers = [ lib.maintainers.kozm9000 ];
};
}

View File

@@ -0,0 +1,98 @@
{
lib,
pkgs,
stdenvNoCC,
fetchFromGitHub,
pnpm,
nodejs,
vscode-utils,
nix-update-script,
}:
let
vsix = stdenvNoCC.mkDerivation (finalAttrs: {
name = "gitlens-${finalAttrs.version}.zip";
pname = "gitlens-vsix";
version = "17.5.1";
src = fetchFromGitHub {
owner = "gitkraken";
repo = "vscode-gitlens";
tag = "v${finalAttrs.version}";
hash = "sha256-DGV4liUpJNM6ktMy3jQ1iEQ7H5mPM17f0uqA8QYHoLc=";
};
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 2;
hash = "sha256-Lx8YRG3B3t83t85PqDMevIm7M0ks2IsluwL1I5zThdA=";
};
postPatch = ''
substituteInPlace scripts/generateLicenses.mjs --replace-fail 'https://raw.githubusercontent.com/microsoft/vscode/refs/heads/main/LICENSE.txt' '${pkgs.vscode-json-languageserver.src}/LICENSE.txt'
'';
nativeBuildInputs = [
nodejs
pnpm.configHook
pnpm
];
# Error: spawn /build/source/node_modules/.pnpm/sass-embedded-linux-x64@1.77.8/node_modules/sass-embedded-linux-x64/dart-sass/src/dart ENOENT
# Remove both node_modules/.pnpm/sass-embedded and node_modules/.pnpm/sass-embedded-linux-x64
preBuild = ''
rm -r node_modules/.pnpm/sass-embedded*
'';
buildPhase = ''
runHook preBuild
node --run package
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp ./gitlens-$version.vsix $out
runHook postInstall
'';
});
in
vscode-utils.buildVscodeExtension (finalAttrs: {
pname = "gitlens";
inherit (finalAttrs.src) version;
vscodeExtPublisher = "eamodio";
vscodeExtName = "gitlens";
vscodeExtUniqueId = "${finalAttrs.vscodeExtPublisher}.${finalAttrs.vscodeExtName}";
src = vsix;
passthru = {
vsix = finalAttrs.src;
updateScript = nix-update-script {
attrPath = "vscode-extensions.eamodio.gitlens.vsix";
};
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/eamodio.gitlens/changelog";
description = "Visual Studio Code extension that improves its built-in Git capabilities";
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 = lib.licenses.mit;
sourceProvenance = with lib.sourceTypes; [ fromSource ];
maintainers = with lib.maintainers; [
xiaoxiangmoe
ratsclub
];
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
vscode-utils,
vscode-extension-update-script,
jq,
harper,
moreutils,
...
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "harper";
publisher = "elijah-potter";
version = harper.version;
hash = "sha256-m9PN1BZf6rLrNnX8meX2TjGx8zGLl0GgnHEgQirh9Oc=";
};
nativeBuildInputs = [
jq
moreutils
];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."harper.path".default = "${harper}/bin/harper-ls"' package.json | sponge package.json
'';
passthru.updateScript = vscode-extension-update-script { };
meta = {
changelog = "https://github.com/Automattic/harper/releases/tag/v${harper.version}";
description = "The grammar checker for developers as a Visual Studio Code extension";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=elijah-potter.harper";
homepage = "https://github.com/automattic/harper";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ MasterEvarior ];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "prettier-vscode";
publisher = "esbenp";
version = "11.0.0";
hash = "sha256-pNjkJhof19cuK0PsXJ/Q/Zb2H7eoIkfXJMLZJ4lDn7k=";
};
meta = {
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 = lib.licenses.mit;
maintainers = [ lib.maintainers.datafoo ];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ethersync";
name = "ethersync";
version = "0.6.0";
hash = "sha256-KuidePUxQ+FhnIGTUf6i+WxBQfbQVlq68xbuOeEouIE=";
};
meta = {
description = "Extension for real-time co-editing of local text files";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ethersync.ethersync";
homepage = "https://github.com/ethersync/ethersync/tree/main/vscode-plugin";
license = lib.licenses.agpl3Plus;
maintainers = [ lib.maintainers.ethancedwards8 ];
teams = [ lib.teams.ngi ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
jq,
moreutils,
racket,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "magic-racket";
publisher = "evzen-wybitul";
version = "0.7.0";
hash = "sha256-8q2H9VPmdIAh4VmtGjIAwUfpr1P7+zmDLGiyCNbAXBU=";
};
nativeBuildInputs = [
jq
moreutils
];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."magicRacket.general.racketPath".default = "${racket}/bin/racket"' package.json | sponge package.json
jq '.contributes.configuration.properties."magicRacket.general.racoPath".default = "${racket}/bin/raco"' package.json | sponge package.json
'';
meta = {
changelog = "https://marketplace.visualstudio.com/items/evzen-wybitul.magic-racket/changelog";
description = "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 = lib.licenses.agpl3Only;
};
}

View File

@@ -0,0 +1,33 @@
{
jq,
lib,
moreutils,
shfmt,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "shell-format";
publisher = "foxundermoon";
version = "7.2.5";
hash = "sha256-kfpRByJDcGY3W9+ELBzDOUMl06D/vyPlN//wPgQhByk=";
};
nativeBuildInputs = [
jq
moreutils
];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."shellformat.path".default = "${shfmt}/bin/shfmt"' package.json | sponge package.json
'';
meta = {
downloadPage = "https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format";
homepage = "https://github.com/foxundermoon/vs-shell-format";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.dbirks ];
};
}

View File

@@ -0,0 +1,17 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "fstar-vscode-assistant";
publisher = "FStarLang";
version = "0.21.0";
hash = "sha256-p1Gh7HKcEXGiObzFt0P/hGS0e5g8ekktmAqSWi6sJwA=";
};
meta = {
description = "Interactive editing mode VS Code extension for F*";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=FStarLang.fstar-vscode-assistant";
homepage = "https://github.com/FStarLang/fstar-vscode-assistant";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.parrot7483 ];
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "github";
name = "copilot-chat";
version = "0.31.5";
hash = "sha256-D7k+hA786w7IZHVI+Og6vHGAAohpfpuOmmCcDUU0WsY=";
};
meta = {
description = "GitHub Copilot Chat is a companion extension to GitHub Copilot that houses experimental chat features";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat";
homepage = "https://github.com/features/copilot";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.laurent-f1z1 ];
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "github";
name = "copilot";
version = "1.372.0";
hash = "sha256-1L4zE2waIjI1Z8hYFaeHbnSWX9g31Sre4uDNOiQ2Fz8=";
};
meta = {
description = "GitHub Copilot uses OpenAI Codex to suggest code and entire functions in real-time right from your editor";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=GitHub.copilot";
homepage = "https://github.com/features/copilot";
license = lib.licenses.unfree;
maintainers = [ lib.maintainers.Zimmi48 ];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
vscode-utils,
jq,
moreutils,
terraform-ls,
vscode-extension-update-script,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "terraform";
publisher = "hashicorp";
version = "2.37.2";
hash = "sha256-TT2n0C8MzERemz/4Hwzf45HoICYe0u3/mMJDhrI5UC8=";
};
postInstall = ''
cd "$out/$installPrefix"
${lib.getExe jq} '.contributes.configuration[0].properties."terraform.languageServer.path".default = "${terraform-ls}/bin/terraform-ls"' package.json | ${lib.getExe' moreutils "sponge"} package.json
'';
passthru.updateScript = vscode-extension-update-script {
extraArgs = [
"--override-filename"
"pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix"
];
};
meta = {
license = lib.licenses.mit;
maintainers = [ lib.maintainers.rhoriguchi ];
};
}

View File

@@ -0,0 +1,20 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "autocorrect";
publisher = "huacnlee";
version = "2.6.4";
hash = "sha256-1cN36FnslttmH66J4Xah1KohM2nEQckNUXHZD+ps2uY=";
};
meta = {
description = "AutoCorrect is a linter and formatter to help you to improve copywriting, correct spaces, words, and punctuations between CJK (Chinese, Japanese, Korean)";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=huacnlee.autocorrect";
homepage = "https://github.com/huacnlee/autocorrect";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.therobot2105 ];
};
}

View File

@@ -0,0 +1,43 @@
{
vscode-utils,
craftos-pc,
jq,
lib,
moreutils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "craftos-pc";
publisher = "jackmacwindows";
version = "1.2.3";
hash = "sha256-QoLMefSmownw9AEem0jx1+BF1bcolHYpiqyPKQNkdiQ=";
};
nativeBuildInputs = [
jq
moreutils
];
postInstall = ''
cd "$out/$installPrefix"
jq -e '
.contributes.configuration.properties."craftos-pc.executablePath.linux".default =
"${lib.meta.getExe craftos-pc}" |
.contributes.configuration.properties."craftos-pc.executablePath.mac".default =
"${lib.meta.getExe craftos-pc}" |
.contributes.configuration.properties."craftos-pc.executablePath.windows".default =
"${lib.meta.getExe craftos-pc}"
' \
< package.json \
| sponge package.json
'';
meta = {
changelog = "https://marketplace.visualstudio.com/items/jackmacwindows.craftos-pc/changelog";
description = "Visual Studio Code extension for opening a CraftOS-PC window";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=jackmacwindows.craftos-pc";
homepage = "https://www.craftos-pc.cc/docs/extension";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ tomodachi94 ];
platforms = craftos-pc.meta.platforms;
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "latex-workshop";
publisher = "James-Yu";
version = "10.10.2";
hash = "sha256-Ls02bUSh5O5mDT2SEnaibvpHw535yelv5NaQ/NRM13k=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/James-Yu.latex-workshop/changelog";
description = "LaTeX Workshop Extension";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop";
homepage = "https://github.com/James-Yu/LaTeX-Workshop";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.therobot2105 ];
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "jasew";
name = "anki";
version = "1.3.5";
hash = "sha256-QPuafIelmhdno/E2zr6NQChv0qjfjMFwx7v0Xat/gDc=";
};
meta = {
description = "Extension for interacting and sending cards to Anki";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=jasew.anki";
homepage = "https://github.com/jasonwilliams/anki";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.ethancedwards8 ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
vscode-utils,
plantuml,
jq,
moreutils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "plantuml";
publisher = "jebbs";
version = "2.18.1";
hash = "sha256-o4FN/vUEK53ZLz5vAniUcnKDjWaKKH0oPZMbXVarDng=";
};
nativeBuildInputs = [
jq
moreutils
];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."plantuml.java".default = "${plantuml}/bin/plantuml"' package.json | sponge package.json
'';
meta = {
description = "Visual Studio Code extension for supporting Rich PlantUML";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml";
homepage = "https://github.com/qjebbs/vscode-plantuml";
changelog = "https://marketplace.visualstudio.com/items/jebbs.plantuml/changelog";
license = lib.licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,17 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "winteriscoming";
publisher = "johnpapa";
version = "1.4.4";
hash = "sha256-47zCB7VDj+gYXUeblbNsWnGMJt4U4UMyqU1NYTmz2Jc=";
};
meta = {
description = "Preferred dark/light themes by John Papa";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=johnpapa.winteriscoming";
homepage = "https://github.com/johnpapa/vscode-winteriscoming";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.therobot2105 ];
};
}

View File

@@ -0,0 +1,38 @@
{
alejandra,
jq,
lib,
moreutils,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "alejandra";
publisher = "kamadorueda";
version = "1.0.0";
hash = "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 = {
description = "Uncompromising Nix Code Formatter";
homepage = "https://github.com/kamadorueda/alejandra";
license = lib.licenses.unlicense;
maintainers = [ lib.maintainers.kamadorueda ];
};
}

View File

@@ -0,0 +1,86 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
pnpm,
nodejs,
vscode-utils,
nix-update-script,
}:
let
vsix = stdenvNoCC.mkDerivation (finalAttrs: {
name = "kilo-code-${finalAttrs.version}.vsix";
pname = "kilo-code-vsix";
version = "4.91.0";
src = fetchFromGitHub {
owner = "Kilo-Org";
repo = "kilocode";
tag = "v${finalAttrs.version}";
hash = "sha256-dUVPCTxfLcsVfy2FqdZMN8grysALUOTiTl4TXM1BcDs=";
};
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 2;
hash = "sha256-4LB2KY+Ksr8BQYoHrz3VNr81++zcrWN+USg3bBfr/FU=";
};
nativeBuildInputs = [
nodejs
pnpm.configHook
pnpm
];
buildPhase = ''
runHook preBuild
node --run build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp ./bin/kilo-code-$version.vsix $out
runHook postInstall
'';
});
in
vscode-utils.buildVscodeExtension (finalAttrs: {
pname = "kilo-code";
inherit (finalAttrs.src) version;
vscodeExtPublisher = "kilocode";
vscodeExtName = "Kilo-Code";
vscodeExtUniqueId = "${finalAttrs.vscodeExtPublisher}.${finalAttrs.vscodeExtName}";
src = vsix;
unpackPhase = ''
runHook preUnpack
unzip $src
runHook postUnpack
'';
passthru = {
vsix = finalAttrs.src;
updateScript = nix-update-script {
attrPath = "vscode-extensions.kilocode.kilo-kode.vsix";
};
};
meta = {
description = "Open Source AI coding assistant for planning, building, and fixing code";
homepage = "https://kilocode.ai";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=kilocode.Kilo-Code";
license = lib.licenses.asl20;
sourceProvenance = with lib.sourceTypes; [ fromSource ];
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
};
})

View File

@@ -0,0 +1,111 @@
{
lib,
vscode-utils,
writeShellScript,
nix-update,
vscode-extension-update,
}:
with vscode-utils;
let
buildVscodeLanguagePack =
{
language,
version ? "1.104.2025091009",
hash,
}:
buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-language-pack-${language}";
publisher = "MS-CEINTL";
inherit version hash;
};
passthru.updateScript = lib.optionalAttrs (language == "fr") (
writeShellScript "vscode-language-packs-update-script" ''
${lib.getExe vscode-extension-update} vscode-extensions.ms-ceintl.vscode-language-pack-fr --override-filename "pkgs/applications/editors/vscode/extensions/language-packs.nix"
for lang in cs de es it ja ko pl pt-br qps-ploc ru tr zh-hans zh-hant; do
${lib.getExe nix-update} --version "skip" "vscode-extensions.ms-ceintl.vscode-language-pack-$lang" --override-filename "pkgs/applications/editors/vscode/extensions/language-packs.nix"
done
''
);
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";
hash = "sha256-7/TiCJ+PhrUpCLznMpxN10GpCObi4gclYz87vOsU2yI=";
};
# Italian
vscode-language-pack-it = buildVscodeLanguagePack {
language = "it";
hash = "sha256-94b/U8yLMlomLx/zi9L/2yOZTb51OIqRgT1Z/xADzG0=";
};
# German
vscode-language-pack-de = buildVscodeLanguagePack {
language = "de";
hash = "sha256-jUDGqsXZpHeKr+xgSwNYWKJTKs/3axV7o8iv7xlxP9w=";
};
# Spanish
vscode-language-pack-es = buildVscodeLanguagePack {
language = "es";
hash = "sha256-hXOdM867rympTOJJh3v8y6B6FIez3+jhQa4kqL2p+98=";
};
# Russian
vscode-language-pack-ru = buildVscodeLanguagePack {
language = "ru";
hash = "sha256-Qt4V5ro1YvZkSkk2mxB/HLXsI3ewmmKor2ZxsMDAHRg=";
};
# Chinese (Simplified)
vscode-language-pack-zh-hans = buildVscodeLanguagePack {
language = "zh-hans";
hash = "sha256-IBXnZNAorbFVu68UOwaGyVBNyPTILYgEZBy6k/EUNjA=";
};
# Chinese (Traditional)
vscode-language-pack-zh-hant = buildVscodeLanguagePack {
language = "zh-hant";
hash = "sha256-iy3+HNkRFwJps/hqQMUjQfWxULewhF+sV1qg8BrMmQo=";
};
# Japanese
vscode-language-pack-ja = buildVscodeLanguagePack {
language = "ja";
hash = "sha256-wZgMj8mmg8lIxX3JCi2fwS0l3/tSrOWuQpuTsW+J4wg=";
};
# Korean
vscode-language-pack-ko = buildVscodeLanguagePack {
language = "ko";
hash = "sha256-5GL95M9y60PjgNL7x/9JthV/g6+okoxT0uwmf/qPvqQ=";
};
# Czech
vscode-language-pack-cs = buildVscodeLanguagePack {
language = "cs";
hash = "sha256-PzhBxDl2X1LStXMHgqMPzl9v7XJ9VuL/8sCsdJ4mFfA=";
};
# Portuguese (Brazil)
vscode-language-pack-pt-br = buildVscodeLanguagePack {
language = "pt-BR";
hash = "sha256-a8eGCArxLbMdQjpRBtcZJ8xlp9+Mbabiy6/v3/HANTQ=";
};
# Turkish
vscode-language-pack-tr = buildVscodeLanguagePack {
language = "tr";
hash = "sha256-ZE9RXpV+k/7KcKlpE8AwW+3y2tupARhXTnucKfM304I=";
};
# Polish
vscode-language-pack-pl = buildVscodeLanguagePack {
language = "pl";
hash = "sha256-V6E5BsIRIPkZhq3g7F65/ml02HibeZyIs17R4TtJQU0=";
};
# Pseudo Language
vscode-language-pack-qps-ploc = buildVscodeLanguagePack {
language = "qps-ploc";
hash = "sha256-Tzqd6BJDGSxtxbZodWvBS64FIvxOmP5SaB+iAl3kU5w=";
};
}

View File

@@ -0,0 +1,18 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "lldb-dap";
publisher = "llvm-vs-code-extensions";
version = "0.2.18";
hash = "sha256-H2CSy+Zow6inLUgSW5VNHZBEmag1acslX3bkw3XYcKA=";
};
meta = {
description = "Debugging with LLDB in Visual Studio Code";
downloadPage = "hhttps://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.lldb-dap";
homepage = "https://github.com/llvm/llvm-project";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.m0nsterrr ];
};
}

View File

@@ -0,0 +1,18 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "cortex-debug";
publisher = "marus25";
version = "1.12.1";
hash = "sha256-ioK6gwtkaAcfxn11lqpwhrpILSfft/byeEqoEtJIfM0=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/marus25.cortex-debug/changelog";
description = "Visual Studio Code extension for enhancing debug capabilities for Cortex-M Microcontrollers";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug";
homepage = "https://github.com/Marus/cortex-debug";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.bcooley ];
};
}

View File

@@ -0,0 +1,16 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "min-theme";
publisher = "miguelsolorio";
version = "1.5.0";
hash = "sha256-DF/9OlWmjmnZNRBs2hk0qEWN38RcgacdVl9e75N8ZMY=";
};
meta = {
description = "Minimal theme for VS Code that comes in dark and light";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=miguelsolorio.min-theme";
homepage = "https://github.com/miguelsolorio/min-theme";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
vscode-utils,
jq,
shfmt,
moreutils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "shfmt";
publisher = "mkhl";
version = "1.5.1";
hash = "sha256-rk+ykkWHxgQyyOC8JyhyOinRPJHh9XxNRAVUzcF7TRI=";
};
postInstall = ''
cd "$out/$installPrefix"
${lib.getExe jq} '.contributes.configuration.properties."shfmt.executablePath".default = "${lib.getExe shfmt}"' package.json | ${lib.getExe' moreutils "sponge"} package.json
'';
meta = {
description = "Extension uses shfmt to provide a formatter for shell script documents";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=mkhl.shfmt";
homepage = "https://codeberg.org/mkhl/vscode-shfmt";
license = lib.licenses.bsd0;
maintainers = [ lib.maintainers.therobot2105 ];
};
}

View File

@@ -0,0 +1,18 @@
{
publisher,
name,
version,
arch ? "",
sha256 ? "",
hash ? "",
}:
let
archurl = (if arch == "" then "" else "?targetPlatform=${arch}");
in
{
url = "https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage${archurl}";
inherit sha256 hash;
# 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";
}

View File

@@ -0,0 +1,19 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "mongodb-vscode";
publisher = "mongodb";
version = "1.14.0";
hash = "sha256-cd/dJO2I9heMVNJjGlBO1+c3wGVF+EuycDa+s/aDBxM=";
};
meta = {
changelog = "https://github.com/mongodb-js/vscode/blob/main/CHANGELOG.md";
description = "Extension for VS Code that makes it easy to work with your data in MongoDB";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=mongodb.mongodb-vscode";
homepage = "https://github.com/mongodb-js/vscode";
license = lib.licenses.asl20;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,59 @@
{
azure-cli,
bicep,
bicep-lsp,
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ms-azuretools";
name = "vscode-bicep";
version = "0.38.33";
hash = "sha256-gmSUPHdbxXu5jUASsbu+yVO2ZdVBo5+uQNeLdTsvQVU=";
};
buildInputs = [
azure-cli
bicep
bicep-lsp
];
meta = {
description = "Visual Studio Code extension for Bicep language";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep";
homepage = "https://github.com/Azure/bicep/tree/main/src/vscode-bicep";
license = lib.licenses.mit;
teams = [ lib.teams.stridtech ];
};
}
# Instructions on Usage
#
# programs.vscode = {
# enable = true;
# package = pkgs.codium;
# profiles.default = {
# "dotnetAcquisitionExtension.sharedExistingDotnetPath" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
# "dotnetAcquisitionExtension.existingDotnetPath" = [
# {
# "extensionId" = "ms-dotnettools.csharp";
# "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
# }
# {
# "extensionId" = "ms-dotnettools.csdevkit";
# "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
# }
# {
# "extensionId" = "ms-azuretools.vscode-bicep";
# "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
# }
# ];
# extensions = with pkgs.vscode-extensions; [
# ms-azuretools.vscode-bicep
# ms-dotnettools.csdevkit
# ms-dotnettools.csharp
# ms-dotnettools.vscode-dotnet-runtime
# ];
# };

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ms-azuretools";
name = "vscode-containers";
version = "2.2.0";
hash = "sha256-UxWsu7AU28plnT0QMdpPJrcYZIV09FeC+rmYKf39a6M=";
};
meta = {
changelog = "https://github.com/microsoft/vscode-containers/releases";
description = "Container Tools Extension for Visual Studio Code ";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-containers";
homepage = "https://github.com/microsoft/vscode-containers";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.m0nsterrr ];
};
}

View File

@@ -0,0 +1,145 @@
{
lib,
stdenv,
vscode-utils,
autoPatchelfHook,
icu,
openssl,
libz,
glibc,
libxml2,
libkrb5,
patchelf,
}:
let
extInfo = (
{
x86_64-linux = {
arch = "linux-x64";
hash = "sha256-4yljDypIsx2bFKgCe0nL7Ljnzq6+efMRMBlpl1T6mU0=";
};
aarch64-linux = {
arch = "linux-arm64";
hash = "sha256-heiercuubJUhzOiRNPRvcBQfvbOtM6albpWvOkHlgsI=";
};
x86_64-darwin = {
arch = "darwin-x64";
hash = "sha256-U3VA9GjyP00bhZid3mdODLfmFW5WmtXmikPByDjELXA=";
};
aarch64-darwin = {
arch = "darwin-arm64";
hash = "sha256-uCOQnQ8x5OGPl/139jAZ12PdbWczS2KOQHLFxjEQnL4=";
};
}
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")
);
in
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "csdevkit";
publisher = "ms-dotnettools";
version = "1.50.51";
inherit (extInfo) hash arch;
};
sourceRoot = "extension"; # This has more than one folder.
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
patchelf
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
(lib.getLib glibc) # libgcc_s.so.1
(lib.getLib icu) # libicui18n.so libicuuc.so
(lib.getLib libkrb5) # libgssapi_krb5.so
(lib.getLib libxml2) # libxml2.so.2
(lib.getLib libz) # libz.so.1
(lib.getLib openssl) # libopenssl.so.3
(lib.getLib stdenv.cc.cc) # libstdc++.so.6
];
postPatch = ''
declare ext_unique_id
ext_unique_id="$(basename "$out" | head -c 32)"
substituteInPlace dist/extension.js \
--replace-fail 'e.extensionPath,"cache"' 'require("os").tmpdir(),"'"$ext_unique_id"'"' \
--replace-fail 't.setExecuteBit=async function(e){if("win32"!==process.platform){const t=i.join(e[a.SERVICEHUB_CONTROLLER_COMPONENT_NAME],"Microsoft.VisualStudio.Code.ServiceController"),r=i.join(e[a.SERVICEHUB_HOST_COMPONENT_NAME],(0,a.getServiceHubHostEntrypointName)()),n=[(0,a.getServerPath)(e),t,r,(0,c.getReliabilityMonitorPath)(e)];await Promise.all(n.map((e=>(0,o.chmod)(e,"0755"))))}}' 't.setExecuteBit=async function(e){}'
'';
preFixup = ''
(
set -euo pipefail
shopt -s globstar
shopt -s dotglob
# Fix all binaries.
for file in "$out"/**/*; do
if [[ ! -f "$file" || "$file" == *.so || "$file" == *.a || "$file" == *.dylib ]] ||
(! isELF "$file" && ! isMachO "$file"); then
continue
fi
echo Making "$file" executable...
chmod +x "$file"
${lib.optionalString stdenv.hostPlatform.isLinux ''
# Add .NET deps if it is an apphost.
if grep 'You must install .NET to run this application.' "$file" > /dev/null; then
echo "Adding .NET needed libraries to: $file"
patchelf \
--add-needed libicui18n.so \
--add-needed libicuuc.so \
--add-needed libgssapi_krb5.so \
--add-needed libssl.so \
"$file"
fi
''}
done
${lib.optionalString stdenv.hostPlatform.isLinux ''
# Add the ICU libraries as needed to the globalization DLLs.
for file in "$out"/**/{libcoreclr.so,*System.Globalization.Native.so}; do
echo "Adding ICU libraries to: $file"
patchelf \
--add-needed libicui18n.so \
--add-needed libicuuc.so \
"$file"
done
# Add the Kerberos libraries as needed to the native security DLL.
for file in "$out"/**/*System.Net.Security.Native.so; do
echo "Adding Kerberos libraries to: $file"
patchelf \
--add-needed libgssapi_krb5.so \
"$file"
done
# Add the OpenSSL libraries as needed to the OpenSSL native security DLL.
for file in "$out"/**/*System.Security.Cryptography.Native.OpenSsl.so; do
echo "Adding OpenSSL libraries to: $file"
patchelf \
--add-needed libssl.so \
"$file"
done
# Fix libxml2 breakage. See https://github.com/NixOS/nixpkgs/pull/396195#issuecomment-2881757108
mkdir -p "$out/lib"
ln -s "${lib.getLib libxml2}/lib/libxml2.so" "$out/lib/libxml2.so.2"
''}
)
'';
meta = {
changelog = "https://marketplace.visualstudio.com/items/ms-dotnettools.csdevkit/changelog";
description = "Official Visual Studio Code extension for C# from Microsoft";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ggg ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
};
}

View File

@@ -0,0 +1,166 @@
{
lib,
stdenv,
fetchzip,
vscode-utils,
autoPatchelfHook,
icu,
openssl,
libz,
glibc,
libkrb5,
coreutils,
jq,
patchelf,
}:
let
extInfo = (
{
x86_64-linux = {
arch = "linux-x64";
hash = "sha256-0SMd7cEMSxH6fuvQl5RKc1jFvonBIgYpUMnmMnDiRmU=";
};
aarch64-linux = {
arch = "linux-arm64";
hash = "sha256-Y6KpB6WreP4ZWovUL4cOZxxorp2Ekzq9jISY0Yo4c1Q=";
};
x86_64-darwin = {
arch = "darwin-x64";
hash = "sha256-uXL/AN3dA45po1EuZHCSCLSFyzfVGs7yPX+0refwy10=";
};
aarch64-darwin = {
arch = "darwin-arm64";
hash = "sha256-Tj0uEwLFMNN+T5XG+8y67ssUig+QeUS4uFe0HZp2ua8=";
};
}
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")
);
# Get url from runtimeDependencies in package.json
# TODO: Automate fetching runtimeDependencies from package.json
# ideally should be done at the vscode-extensions level for
# everyone to reuse.
roslyn-copilot = fetchzip {
url = "https://roslyn.blob.core.windows.net/releases/Microsoft.VisualStudio.Copilot.Roslyn.LanguageServer-18.0.479-alpha.zip";
hash = "sha256-xq66gY3N3/R9bG6XWqLy53T/ExzGdZi3ZBNEzYAeqM8=";
postFetch = ''
touch install.Lock
'';
};
in
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "csharp";
publisher = "ms-dotnettools";
version = "2.90.60";
inherit (extInfo) hash arch;
};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
jq
patchelf
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
(lib.getLib glibc) # libgcc_s.so.1
(lib.getLib icu) # libicui18n.so libicuuc.so
(lib.getLib libkrb5) # libgssapi_krb5.so
(lib.getLib libz) # libz.so.1
(lib.getLib openssl) # libopenssl.so.3
(lib.getLib stdenv.cc.cc) # libstdc++.so.6
];
postPatch = ''
substituteInPlace dist/extension.js \
--replace-fail 'uname -m' '${lib.getExe' coreutils "uname"} -m'
'';
postInstall = ''
ln -s ${roslyn-copilot} "$out"/share/vscode/extensions/ms-dotnettools.csharp/.roslynCopilot
'';
preFixup = ''
(
set -euo pipefail
shopt -s globstar
shopt -s dotglob
# Fix all binaries.
for file in "$out"/**/*; do
if [[ ! -f "$file" || "$file" == *.so || "$file" == *.a || "$file" == *.dylib ]] ||
(! isELF "$file" && ! isMachO "$file"); then
continue
fi
echo Making "$file" executable...
chmod +x "$file"
${lib.optionalString stdenv.hostPlatform.isLinux ''
# Add .NET deps if it is an apphost.
if grep 'You must install .NET to run this application.' "$file" > /dev/null; then
echo "Adding .NET needed libraries to: $file"
patchelf \
--add-needed libicui18n.so \
--add-needed libicuuc.so \
--add-needed libgssapi_krb5.so \
--add-needed libssl.so \
"$file"
fi
''}
done
${lib.optionalString stdenv.hostPlatform.isLinux ''
# Add the ICU libraries as needed to the globalization DLLs.
for file in "$out"/**/{libcoreclr.so,*System.Globalization.Native.so}; do
echo "Adding ICU libraries to: $file"
patchelf \
--add-needed libicui18n.so \
--add-needed libicuuc.so \
"$file"
done
# Add the Kerberos libraries as needed to the native security DLL.
for file in "$out"/**/*System.Net.Security.Native.so; do
echo "Adding Kerberos libraries to: $file"
patchelf \
--add-needed libgssapi_krb5.so \
"$file"
done
# Add the OpenSSL libraries as needed to the OpenSSL native security DLL.
for file in "$out"/**/*System.Security.Cryptography.Native.OpenSsl.so; do
echo "Adding OpenSSL libraries to: $file"
patchelf \
--add-needed libssl.so \
"$file"
done
# Add the needed binaries to the apphost binaries.
for file in $(jq -r '.runtimeDependencies | map(select(.binaries != null) | .installPath + "/" + .binaries[]) | sort | unique | map(sub("/\\./"; "/")) | .[]' < "$out"/share/vscode/extensions/ms-dotnettools.csharp/package.json); do
[ -f "$out"/share/vscode/extensions/ms-dotnettools.csharp/"$file" ] || continue
echo "Adding .NET needed libraries to: $out/share/vscode/extensions/ms-dotnettools.csharp/$file"
patchelf \
--add-needed libicui18n.so \
--add-needed libicuuc.so \
--add-needed libgssapi_krb5.so \
--add-needed libssl.so \
"$out"/share/vscode/extensions/ms-dotnettools.csharp/"$file"
done
''}
)
'';
meta = {
description = "Official C# support for Visual Studio Code";
homepage = "https://github.com/dotnet/vscode-csharp";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ggg ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ms-pyright";
name = "pyright";
version = "1.1.406";
hash = "sha256-Lz8x/op0RUluE7R6xssg2nVviT0O1tZXUopzKt0f99U=";
};
meta = {
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 = lib.licenses.mit;
maintainers = [ lib.maintainers.ratsclub ];
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ms-python";
name = "black-formatter";
version = "2025.2.0";
hash = "sha256-EPtxcp42KunVwVdT/xhVzuwvQ+5VswGNnOZpYXZOP04=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/ms-python.black-formatter/changelog";
description = "Formatter extension for Visual Studio Code using black";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter";
homepage = "https://github.com/microsoft/vscode-black-formatter";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
amadejkastelic
sikmir
];
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "debugpy";
publisher = "ms-python";
version = "2025.10.0";
hash = "sha256-NDCNiKLCU7/2VH43eTyOMBTZ3oxzA7JwCBit9+JHfmY=";
};
meta = {
description = "Python debugger (debugpy) extension for VS Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.debugpy";
homepage = "https://github.com/Microsoft/vscode-python-debugger";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.carlthome ];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ms-python";
name = "flake8";
version = "2025.2.0";
hash = "sha256-DbPm/ekturW31jqZw0fvVOvzxAY286eJmgDcahDt0K0=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/ms-python.flake8/changelog";
description = "Python linting support for VS Code using Flake8";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.flake8";
homepage = "https://github.com/microsoft/vscode-flake8";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.amadejkastelic ];
};
}

View File

@@ -0,0 +1,20 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ms-python";
name = "isort";
version = "2025.0.0";
hash = "sha256-nwt9Pv084jt9nWvxSXLIWu7981UGSbCgVRTrFfJA6q4=";
};
meta = with lib; {
description = "Import sorting extension for Visual Studio Code using isort";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.isort";
homepage = "https://github.com/microsoft/vscode-isort";
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ms-python";
name = "mypy-type-checker";
version = "2025.2.0";
hash = "sha256-VJ/XSC4cbIjgxKLsXxUxwko+HR0U59c8OrhYnKPJu4g=";
};
meta = {
changelog = "https://github.com/microsoft/vscode-mypy/releases";
description = "VSCode extension for type checking support for Python files using Mypy";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.mypy-type-checker";
homepage = "https://github.com/microsoft/vscode-mypy";
license = lib.licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ms-python";
name = "pylint";
version = "2025.2.0";
hash = "sha256-3RqY/uugtJvT2lWxsA8NWFWel/CxMZzo7PnS9SaRdGg=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/ms-python.pylint/changelog";
description = "Python linting support for VS Code using Pylint";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.pylint";
homepage = "https://github.com/microsoft/vscode-pylint";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.amadejkastelic ];
};
}

View File

@@ -0,0 +1,86 @@
{
stdenv,
lib,
vscode-utils,
icu,
python3,
# When `true`, the python default setting will be fixed to specified.
# Use version from `PATH` for default setting otherwise.
# Defaults to `false` as we expect it to be project specific most of the time.
pythonUseFixed ? false,
# For updateScript
vscode-extension-update-script,
}:
let
supported = {
x86_64-linux = {
hash = "sha256-AlqZTioxiL0XPRMpWMWw8fIWoDAmU1ybCaDhlaXv6lc=";
arch = "linux-x64";
};
x86_64-darwin = {
hash = "sha256-IWj79vUJJXt88kDiCIHVY95aKsHB84vH3iv6GgLOFQo=";
arch = "darwin-x64";
};
aarch64-linux = {
hash = "sha256-kTSHvqS50UZ/yTMqJITyFIUZgHn1dMSwX1R3oxmTnYk=";
arch = "linux-arm64";
};
aarch64-darwin = {
hash = "sha256-LWA8LqCQrmd83icDYCmUgytPJbCV3ecNobSpWV2R3MA=";
arch = "darwin-arm64";
};
};
base =
supported.${stdenv.hostPlatform.system}
or (throw "unsupported platform ${stdenv.hostPlatform.system}");
in
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = base // {
name = "python";
publisher = "ms-python";
version = "2025.12.0";
};
buildInputs = [ icu ];
nativeBuildInputs = [ python3.pkgs.wrapPython ];
propagatedBuildInputs = with python3.pkgs; [
debugpy
jedi-language-server
];
postPatch = ''
# remove bundled python deps and use libs from nixpkgs
rm -r python_files/lib
mkdir -p python_files/lib/python/
ln -s ${python3.pkgs.debugpy}/lib/*/site-packages/debugpy python_files/lib/python/
buildPythonPath "$propagatedBuildInputs"
for i in python_files/*.py; do
patchPythonScript "$i"
done
''
+ lib.optionalString pythonUseFixed ''
# Patch `packages.json` so that nix's *python* is used as default value for `python.pythonPath`.
substituteInPlace "./package.json" \
--replace-fail "\"default\":\"python\"" "\"default\":\"${python3.interpreter}\""
'';
passthru.updateScript = vscode-extension-update-script { };
meta = {
description = "Visual Studio Code extension with rich support for the Python language";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.python";
homepage = "https://github.com/Microsoft/vscode-python";
changelog = "https://github.com/microsoft/vscode-python/releases";
license = lib.licenses.mit;
platforms = builtins.attrNames supported;
maintainers = [
lib.maintainers.jraygauthier
lib.maintainers.jfchevrette
];
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
pyright,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-pylance";
publisher = "MS-python";
version = "2025.8.2";
hash = "sha256-Z2R7gUZw1S2iL3KX/3fB326lFzE39v9LGq17Ec2aHCA=";
};
buildInputs = [ pyright ];
meta = {
changelog = "https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/changelog";
description = "Performant, feature-rich language server for Python in VS Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance";
homepage = "https://github.com/microsoft/pylance-release";
license = lib.licenses.unfree;
maintainers = [ lib.maintainers.ericthemagician ];
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
vscode-utils,
jq,
moreutils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "jupyter";
publisher = "ms-toolsai";
version = "2025.8.0";
hash = "sha256-MZHsgFxrAbDjRn0cH+cBolVvFQXlZPiVSZDUWDU6/jA=";
};
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
# Add a link from temp to /tmp so that the extension gets a writable
# directory to write to.
ln -s /tmp temp
'';
meta = {
description = "Jupyter extension for vscode";
homepage = "https://github.com/microsoft/vscode-jupyter";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.jraygauthier ];
};
}

View File

@@ -0,0 +1,105 @@
{
lib,
nixosTests,
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;
# As VS Code executes this code on the remote machine
# we test to see if we can build Node from Nixpkgs
# otherwise we check if the globally installed Node
# is usable.
patch = ''
# Use Node from nixpkgs for NixOS hosts
#
serverDir="$HOME/.vscode-server/bin/$COMMIT_ID"
serverNode="$serverDir/node"
echo "VS Code Node: $serverNode"
# Check if Node included with VS Code Server runs
if ! nodeVersion=$($serverNode -v); then
echo "VS Code Node Version: $nodeVersion"
if ! nix-build "<nixpkgs>" -A patchelf --out-link "$serverDir/patchelf" || ! "$serverDir/patchelf/bin/patchelf" --version; then
echo "Failed to get patchelf from nixpkgs"
fi
if [ -e $serverNode.orig ]; then
cp $serverNode.orig $serverNode
else
cp $serverNode $serverNode.orig
fi
if ! nix-build "<nixpkgs>" -A bintools --out-link $serverDir/bintools; then
echo "Failed to build bintools from nixpkgs"
fi
INTERPRETER=$(cat $serverDir/bintools/nix-support/dynamic-linker)
echo "Interpreter from bintools: $INTERPRETER"
if ! nix-build "<nixpkgs>" -A stdenv.cc.cc.lib --out-link $serverDir/cc; then
echo "Failed to build stdenv.cc.cc.lib from nixpkgs"
fi
if ! $serverDir/patchelf/bin/patchelf --set-interpreter $INTERPRETER --set-rpath $serverDir/cc-lib/lib $serverNode; then
echo "Failed to patch Node binary"
fi
rm "$serverDir/patchelf"
fi
nodeVersion=$($serverNode -v)
echo "VS Code Node Version: $nodeVersion"
if ! nodeVersion=$($serverNode -v); then
echo "Unable to fix Node binary, quitting"
fail_with_exitcode ''${f.UnifiedStatusCode.ServerTransferFailed}
fi
${lib.optionalString useLocalExtensions ''
# Use local extensions
if [ -d $HOME/.vscode/extensions ]; then
if [ -e $HOME/.vscode-server/extensions ]; then
mv $HOME/.vscode-server/extensions $HOME/.vscode-server/extensions.bak
fi
mkdir -p $HOME/.vscode-server
ln -s $HOME/.vscode/extensions $HOME/.vscode-server/extensions
fi
''}
#
# Start the server
'';
in
buildVscodeMarketplaceExtension {
mktplcRef = {
name = "remote-ssh";
publisher = "ms-vscode-remote";
version = "0.120.0";
hash = "sha256-D9YmLKGDtIb2wGfLNRbczqL4fzLASbZC/563ewzqGV0=";
};
postPatch = ''
substituteInPlace "out/extension.js" \
--replace '# Start the server\n' '${patch}'
'';
passthru.tests = {
inherit (nixosTests) vscode-remote-ssh;
};
meta = {
description = "Use any remote machine with a SSH server as your development environment";
license = lib.licenses.unfree;
maintainers = [ lib.maintainers.tbenst ];
};
}

View File

@@ -0,0 +1,20 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-remote-extensionpack";
publisher = "ms-vscode-remote";
version = "0.26.0";
hash = "sha256-YUo0QbJILa9BzWub6Wi6cDD/Zsy/H8LZ8j+9H+5pVHY=";
};
meta = {
description = "Visual Studio Code extension pack that lets you open any folder in a container, on a remote machine, or in WSL and take advantage of VS Code's full feature set";
homepage = "https://github.com/Microsoft/vscode-remote-release";
license = lib.licenses.unfree;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,144 @@
{
lib,
vscode-utils,
jq,
clang-tools,
gdbUseFixed ? true,
gdb, # The gdb default setting will be fixed to specified. Use version from `PATH` otherwise.
autoPatchelfHook,
makeWrapper,
stdenv,
lttng-ust,
libkrb5,
zlib,
}:
/*
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:
<https://github.com/Microsoft/MIEngine/blob/2885386dc7f35e0f1e44827269341e786361f28e/src/MICore/TerminalLauncher.cs#L156>
Also, the extension should eventually no longer require an external terminal. See:
<https://github.com/Microsoft/vscode-cpptools/issues/35>
Once the symbolic link temporary solution taken, everything should run smootly.
*/
let
gdbDefaultsTo = if gdbUseFixed then "${gdb}/bin/gdb" else "gdb";
isx86Linux = stdenv.hostPlatform.system == "x86_64-linux";
isDarwin = stdenv.hostPlatform.isDarwin;
supported = {
x86_64-linux = {
hash = "sha256-JES5esVW6cRlrmFAQO1yLYEZbLdQu4ILW0rjDBp5Ek4=";
arch = "linux-x64";
};
aarch64-linux = {
hash = "sha256-fZzYzR2wHbCCllhyu4fI2ekPu3fMngUmeJawhkYdWyA=";
arch = "linux-arm64";
};
aarch64-darwin = {
hash = "sha256-fPtCIOYvbO/S06io9lFAXxkB/6g00GO5+RXt5aewPME=";
arch = "darwin-arm64";
};
};
base =
supported.${stdenv.hostPlatform.system}
or (throw "unsupported platform ${stdenv.hostPlatform.system}");
in
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = base // {
name = "cpptools";
publisher = "ms-vscode";
version = "1.26.3";
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
buildInputs = [
jq
libkrb5
zlib
(lib.getLib stdenv.cc.cc)
]
++ lib.optionals stdenv.hostPlatform.isLinux [ lttng-ust ];
dontAutoPatchelf = isx86Linux || isDarwin;
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"
# Clang-format from nix package.
rm -rf ./LLVM
mkdir "./LLVM/"
find "${clang-tools}" -mindepth 1 -maxdepth 1 | xargs ln -s -t "./LLVM"
# Patching binaries
chmod +x bin/cpptools bin/cpptools-srv bin/cpptools-wordexp debugAdapters/bin/OpenDebugAD7
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf --replace-needed liblttng-ust.so.0 liblttng-ust.so.1 ./debugAdapters/bin/libcoreclrtraceptprovider.so
''
+ lib.optionalString isx86Linux ''
chmod +x bin/libc.so
''
+ lib.optionalString isDarwin ''
chmod +x debugAdapters/lldb-mi/bin/lldb-mi
'';
# On aarch64 the binaries are statically linked
# but on x86 they are not.
postFixup =
lib.optionalString isx86Linux ''
autoPatchelf $out/share/vscode/extensions/ms-vscode.cpptools/debugAdapters
# cpptools* are distributed by the extension and need to be run through the distributed musl interpretter
patchelf --set-interpreter $out/share/vscode/extensions/ms-vscode.cpptools/bin/libc.so $out/share/vscode/extensions/ms-vscode.cpptools/bin/cpptools
patchelf --set-interpreter $out/share/vscode/extensions/ms-vscode.cpptools/bin/libc.so $out/share/vscode/extensions/ms-vscode.cpptools/bin/cpptools-srv
patchelf --set-interpreter $out/share/vscode/extensions/ms-vscode.cpptools/bin/libc.so $out/share/vscode/extensions/ms-vscode.cpptools/bin/cpptools-wordexp
''
+ lib.optionalString gdbUseFixed ''
wrapProgram $out/share/vscode/extensions/ms-vscode.cpptools/debugAdapters/bin/OpenDebugAD7 --prefix PATH : ${lib.makeBinPath [ gdb ]}
'';
meta = {
description = "C/C++ extension adds language support for C/C++ to Visual Studio Code, including features such as IntelliSense and debugging";
homepage = "https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [
jraygauthier
stargate01
];
platforms = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
}

View File

@@ -0,0 +1,51 @@
#!/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 <nixpkgs> {}); ${pkg}"
echo "$(nix-build -E "$nixExp" --no-out-link)${suffix}"
}
interpreter="$(get_pkg_out "stdenv.cc.libc" "/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
}

View File

@@ -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"
]

View File

@@ -0,0 +1,161 @@
#!/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 formatted 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() {
rm -rf "$tmpDir"
}
function make_trapped_tmpdir() {
tmpDir=$(mktemp -d)
trap rm_tmpdir EXIT
}
echo
echo "------------- Unpacked extension ---------------"
make_trapped_tmpdir
unzip -q -d "$tmpDir" "$cpptoolsZipStorePath"
cpptoolsStorePath="$(nix add-to-store -n "$extStoreName" "$tmpDir")"
cpptoolsSha256="$(nix --extra-experimental-features nix-command 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"
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"
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

View File

@@ -0,0 +1,20 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "remote-explorer";
publisher = "ms-vscode";
version = "0.5.0";
sha256 = "sha256-BNsnetpddxv3Y9MjZERU5jOq1I2g6BNFF1rD7Agpmr8=";
};
meta = {
description = "Visual Studio Code extension to view remote machines for SSH and Tunnels";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-vscode.remote-explorer";
homepage = "https://github.com/Microsoft/vscode-remote-release";
license = lib.licenses.unfree;
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
vscode-utils,
xsel,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vsliveshare";
publisher = "ms-vsliveshare";
version = "1.0.5959";
hash = "sha256-MibP2zqTwlXXVsXQOSuoi5SO8BskJC/AihrhJFg8tac=";
};
postPatch = ''
substituteInPlace vendor.js \
--replace-fail '"xsel"' '"${xsel}/bin/xsel"'
'';
meta = {
description = "Real-time collaborative development for VS Code";
homepage = "https://aka.ms/vsls-docs";
changelog = "https://marketplace.visualstudio.com/items/MS-vsliveshare.vsliveshare/changelog";
license = lib.licenses.unfree;
maintainers = builtins.attrValues { inherit (lib.maintainers) jraygauthier V; };
};
}

View File

@@ -0,0 +1,20 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "windows-ai-studio";
publisher = "ms-windows-ai-studio";
version = "0.22.1";
hash = "sha256-eUtl1x3HqpFEUGkBVb8EOHneWV7DfYHHWGmM5gOGYcg=";
};
meta = {
description = "Visual Studio Code extension to help developers and AI engineers build AI apps";
homepage = "https://github.com/Microsoft/windows-ai-studio";
license = lib.licenses.unfree;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,37 @@
{
jq,
lib,
moreutils,
tinymist,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "tinymist";
publisher = "myriad-dreamin";
inherit (tinymist) version;
hash = "sha256-LUJ0e/ndyeeRsC2h7JJL6zymmPDWxW0cPGBceuC7+X0=";
};
nativeBuildInputs = [
jq
moreutils
];
buildInputs = [ tinymist ];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."tinymist.serverPath".default = "${lib.getExe tinymist}"' package.json | sponge package.json
'';
meta = {
changelog = "https://marketplace.visualstudio.com/items/myriad-dreamin.tinymist/changelog";
description = "VSCode extension for providing an integration solution for Typst";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist";
homepage = "https://github.com/myriad-dreamin/tinymist";
license = lib.licenses.asl20;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,19 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "reload";
publisher = "natqe";
version = "0.0.7";
hash = "sha256-j0Dj7YiawhPAMHe8wk8Ph4vo26IneidoGJ4C9O7Z/64=";
};
meta = {
description = "This extension will add reload button to status bar in the right-bottom of your VSCode editor";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=natqe.reload";
homepage = "https://github.com/natqe/reload";
license = lib.licenses.unfree;
maintainers = [ lib.maintainers.therobot2105 ];
};
}

View File

@@ -0,0 +1,20 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "ndonfris";
name = "fish-lsp";
version = "0.1.16";
hash = "sha256-6WsBJbQ9CgiZ7Wn9U33MxEEorR96zKtGXsMRJZ3j2Dk=";
};
meta = {
description = "LSP implementation for the fish shell language";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ndonfris.fish-lsp";
homepage = "https://github.com/ndonfris/fish-lsp";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,19 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "gremlins";
publisher = "nhoizey";
version = "0.26.0";
hash = "sha256-ML04SccSOrj5qY0HHJ5jiNbWkPElU1+zZNSX2i1K2uk=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/nhoizey.gremlins/changelog";
description = "Reveals some characters that can be harmful because they are invisible or looking like legitimate ones";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=nhoizey.gremlins";
homepage = "https://github.com/nhoizey/vscode-gremlins";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.theobori ];
};
}

View File

@@ -0,0 +1,17 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "nimlang";
publisher = "nimlang";
version = "1.8.1";
hash = "sha256-Apfq0VeLEmXnxsaipA+aJr/QX+chAQQGQQ+64hqFIbA=";
};
meta = {
description = "Nim language support for VS Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=nimlang.nimlang";
homepage = "https://github.com/nim-lang/vscode-nim";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.therobot2105 ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
vscode-utils,
jq,
python3,
moreutils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "oliver-ni";
name = "scheme-fmt";
version = "1.2.1";
hash = "sha256-oTXy0Vjd0s7ZYZzr36ILQOJm4BW9Qd7y8fGbnhkaD1Y=";
};
postInstall = ''
cd "$out/$installPrefix"
${lib.getExe jq} '.contributes.configuration.properties."scheme-fmt.pythonPath".default = "${lib.getExe python3}"' package.json | ${lib.getExe' moreutils "sponge"} package.json
'';
meta = {
description = "Formats Scheme source code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=oliver-ni.scheme-fmt";
homepage = "https://github.com/oliver-ni/scheme-fmt";
license = lib.licenses.cc0;
};
}

View File

@@ -0,0 +1,17 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "nix-env-picker";
publisher = "io-github-oops418";
version = "0.0.4";
hash = "sha256-LGw7Pd72oVgMqhKPX1dV2EgluX0/4rvKVb7Fx2H6hOI=";
};
meta = {
description = "Visual Studio Code extension for seamless switching between Nix shells and flakes";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=io-github-oops418.nix-env-picker";
homepage = "https://github.com/Oops418/nix-env-picker";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.Oops418 ];
};
}

View File

@@ -0,0 +1,17 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "arc-plus";
publisher = "ph-hawkins";
version = "1.0.2";
hash = "sha256-kI8UHo16PbOSLXBG9du4Ceb+aorVGGOH17Vg6ufy/D0=";
};
meta = {
description = "UI theme based on the Arc GTK theme while also retaining some elements of the default VS Code theme";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ph-hawkins.arc-plus";
homepage = "https://github.com/phil-harmoniq/arc-plus";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ aduh95 ];
};
}

View File

@@ -0,0 +1,19 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "material-icon-theme";
publisher = "PKief";
version = "5.27.0";
hash = "sha256-vP5jMijMIKHUmvSaTX+eEO6Z3dzUCR6S/ZdPxjJHIT8=";
};
meta = {
description = "Material Design Icons for Visual Studio Code";
downloadPage = "https://marketplace.visualstudio.com/items/?itemName=PKief.material-icon-theme";
homepage = "https://github.com/material-extensions/vscode-material-icon-theme/blob/main/README.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.therobot2105 ];
};
}

View File

@@ -0,0 +1,20 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "platformio-ide";
publisher = "platformio";
version = "3.3.4";
hash = "sha256-qfNz4IYjCmCMFLtAkbGTW5xnsVT8iDnFWjrgkmr2Slk=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/platformio.platformio-ide/changelog";
description = "Open source ecosystem for IoT development in VSCode";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide";
homepage = "https://platformio.org/";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.therobot2105 ];
};
}

View File

@@ -0,0 +1,18 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "pylyzer";
publisher = "pylyzer";
version = "0.1.11";
hash = "sha256-RIJwzScCRTL9SJZ3B9PFBkocnGdZ7D8uYjcXPsTumho=";
};
meta = {
description = "VS Code extension for Pylyzer, a fast static code analyzer & language server for Python";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=pylyzer.pylyzer";
homepage = "https://github.com/mtshiba/pylyzer/";
license = lib.licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenvNoCC,
vscode-utils,
vscode-extension-update-script,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef =
let
sources = {
"x86_64-linux" = {
arch = "linux-x64";
hash = "sha256-FnMTpDXC/UIMPfcBbpZRo/T0LljFP0+syv2aTZjOczc=";
};
"x86_64-darwin" = {
arch = "darwin-x64";
hash = "sha256-bPkRzOpd7nlIg3oLvrfIrcvrxJqnRhNZNzgao8ga+OM=";
};
"aarch64-darwin" = {
arch = "darwin-arm64";
hash = "sha256-UnRWxjmicfizn8SUspkhjjiYDJDFGI4ItIPLTnRZEy0=";
};
};
in
{
publisher = "redhat";
name = "vscode-xml";
version = "0.29.0";
}
// sources.${stdenvNoCC.hostPlatform.system} or { };
passthru.updateScript = vscode-extension-update-script {
extraArgs = [
"--override-filename"
"pkgs/applications/editors/vscode/extensions/redhat.vscode-xml/default.nix"
];
};
meta = {
license = lib.licenses.epl20;
platforms = [
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
};
}

View File

@@ -0,0 +1,21 @@
{ lib, vscode-utils }:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "r-syntax";
publisher = "REditorSupport";
version = "0.1.3";
hash = "sha256-grkfkmyERVUkB8kSH+NPd2Mv4WF/h/obw8ebmxPx5zU=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/REditorSupport.r-syntax/changelog";
description = "R Synxtax Highlight for Visual Studio Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=REditorSupport.r-syntax";
homepage = "https://github.com/REditorSupport/vscode-R-syntax";
license = lib.licenses.mit;
maintainers = [
lib.maintainers.ivyfanchiang
lib.maintainers.pandapip1
];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
vscode-utils,
jq,
moreutils,
languageserver ? rPackages.languageserver,
R,
radian,
rPackages,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "r";
publisher = "reditorsupport";
version = "2.8.6";
hash = "sha256-T/Qh0WfTfXMzPonbg9NMII5qFptfNoApFFiZCT5rR3Y=";
};
nativeBuildInputs = [
jq
moreutils
];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."r.rpath.mac".default = "${lib.getExe' R "R"}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.rpath.linux".default = "${lib.getExe' R "R"}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.rterm.mac".default = "${lib.getExe radian}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.rterm.linux".default = "${lib.getExe radian}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.libPaths".default = [ "${languageserver}/library" ]' package.json | sponge package.json
'';
meta = {
changelog = "https://marketplace.visualstudio.com/items/REditorSupport.r/changelog";
description = "Visual Studio Code extension for the R programming language";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=REditorSupport.r";
homepage = "https://github.com/REditorSupport/vscode-R";
license = lib.licenses.mit;
maintainers = [
lib.maintainers.pandapip1
lib.maintainers.ivyfanchiang
];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
vscode-utils,
jq,
chez,
moreutils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "release-candidate";
name = "vscode-scheme-repl";
version = "0.7.4";
hash = "sha256-Pfy0aJXq8I53o5mG4dfzyqsyLQX0bs+phBgN46yU/Yw=";
};
postInstall = ''
cd "$out/$installPrefix"
${lib.getExe jq} '.contributes.configuration.properties."chezScheme.schemePath" = "${lib.getExe' chez "scheme"}"' package.json | ${lib.getExe' moreutils "sponge"} package.json
'';
meta = {
description = "Uses REPL for autocompletions and to evaluate expressions";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=release-candidate.vscode-scheme-repl";
homepage = "https://github.com/Release-Candidate/vscode-scheme-repl";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "robotframework-lsp";
publisher = "robocorp";
version = "1.13.0";
hash = "sha256-3hyKKAMUy4kXGRWBQCL4adV1W6xtgS1OYhJJYSzswbo=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/myriad-dreamin.tinymist/changelog";
description = "VSCode extension for providing an integration solution for Typst";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist";
homepage = "https://github.com/myriad-dreamin/tinymist";
license = lib.licenses.asl20;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
vscode-utils,
vscode-extension-update-script,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "RooVeterinaryInc";
name = "roo-cline";
version = "3.28.9";
hash = "sha256-RNPXhCRfyFl0pQ5mELdZ2RIBms9pCpH99//AiUbRzAE=";
};
passthru.updateScript = vscode-extension-update-script { };
meta = {
description = "AI-powered autonomous coding agent that lives in your editor";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline";
homepage = "https://github.com/RooVetGit/Roo-Code";
license = lib.licenses.asl20;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,97 @@
{
pkgsBuildBuild,
lib,
fetchFromGitHub,
vscode-utils,
jq,
rust-analyzer,
buildNpmPackage,
moreutils,
esbuild,
pkg-config,
libsecret,
setDefaultServerPath ? true,
}:
let
pname = "rust-analyzer";
publisher = "rust-lang";
# Use the plugin version as in vscode marketplace, updated by update script.
inherit (vsix) version;
releaseTag = "2025-08-25";
src = fetchFromGitHub {
owner = "rust-lang";
repo = "rust-analyzer";
tag = releaseTag;
hash = "sha256-apbJj2tsJkL2l+7Or9tJm1Mt5QPB6w/zIyDkCx8pfvk=";
};
vsix = buildNpmPackage {
inherit pname releaseTag;
version = lib.trim (lib.readFile ./version.txt);
src = "${src}/editors/code";
npmDepsHash = "sha256-fV4Z3jj+v56A7wbIEYhVAPVuAMqMds5xSe3OetWAsbw=";
buildInputs = [
pkgsBuildBuild.libsecret
];
nativeBuildInputs = [
jq
moreutils
esbuild
# Required by `keytar`, which is a dependency of `vsce`.
pkg-config
];
# Follows https://github.com/rust-lang/rust-analyzer/blob/41949748a6123fd6061eb984a47f4fe780525e63/xtask/src/dist.rs#L39-L65
installPhase = ''
jq '
.version = $ENV.version |
.releaseTag = $ENV.releaseTag |
.enableProposedApi = false |
walk(del(.["$generated-start"]?) | del(.["$generated-end"]?))
' package.json | sponge package.json
mkdir -p $out
npx vsce package -o $out/${pname}.zip
'';
};
in
vscode-utils.buildVscodeExtension {
inherit version vsix pname;
src = "${vsix}/${pname}.zip";
vscodeExtUniqueId = "${publisher}.${pname}";
vscodeExtPublisher = publisher;
vscodeExtName = pname;
nativeBuildInputs = lib.optionals setDefaultServerPath [
jq
moreutils
];
preInstall = lib.optionalString setDefaultServerPath ''
jq '(.contributes.configuration[] | select(.title == "Server") | .properties."rust-analyzer.server.path".default) = $s' \
--arg s "${rust-analyzer}/bin/rust-analyzer" \
package.json | sponge package.json
# Ensure that the previous modification worked, by searching for the binary path
grep -Fq ${rust-analyzer}/bin/rust-analyzer package.json || {
echo "Modifying 'rust-analyzer.server.path' in 'package.json' failed."
exit 1
}
'';
meta = {
description = "Alternative rust language server to the RLS";
homepage = "https://github.com/rust-lang/rust-analyzer";
license = [
lib.licenses.mit
lib.licenses.asl20
];
maintainers = [ ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq libarchive
#shellcheck shell=bash
set -euo pipefail
cd "$(dirname "$0")"
nixpkgs=../../../../../../
owner=rust-lang
repo=rust-analyzer
ver=$(
curl -s "https://api.github.com/repos/$owner/$repo/releases" |
jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output
)
node_src="$(nix-build "$nixpkgs" -A rust-analyzer.src --no-out-link)/editors/code"
# Check vscode compatibility
req_vscode_ver="$(jq '.engines.vscode' "$node_src/package.json" --raw-output)"
req_vscode_ver="${req_vscode_ver#^}"
cur_vscode_ver="$(nix-instantiate --eval --strict "$nixpkgs" -A vscode.version | tr -d '"')"
if [[ "$(nix-instantiate --eval --strict -E "(builtins.compareVersions \"$req_vscode_ver\" \"$cur_vscode_ver\")")" -gt 0 ]]; then
echo "vscode $cur_vscode_ver is incompatible with the extension requiring ^$req_vscode_ver"
exit 1
fi
vsix_url="https://github.com/$owner/$repo/releases/download/$ver/rust-analyzer-linux-x64.vsix"
extension_ver=$(curl $vsix_url -L |
bsdtar -xf - --to-stdout extension/package.json | # Use bsdtar to extract vsix(zip).
jq --raw-output '.version')
echo $extension_ver > version.txt
echo "Extension version: $extension_ver"
echo "Remember to also update the releaseTag and hash in default.nix!"
echo "The releaseTag should be set to $ver"

Some files were not shown because too many files have changed in this diff Show More