From 6068acb93a1add2c7ea775ebd1c2f379c4c54f9f Mon Sep 17 00:00:00 2001 From: emaryn Date: Mon, 26 May 2025 11:21:38 +0800 Subject: [PATCH] vscode-extensions.redhat.vscode-xml: fix --- .../editors/vscode/extensions/default.nix | 10 +--- .../extensions/redhat.vscode-xml/default.nix | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 pkgs/applications/editors/vscode/extensions/redhat.vscode-xml/default.nix diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 2c6a4d755db3..84678c9b97fd 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -4044,15 +4044,7 @@ let }; }; - redhat.vscode-xml = buildVscodeMarketplaceExtension { - mktplcRef = { - publisher = "redhat"; - name = "vscode-xml"; - version = "0.29.0"; - hash = "sha256-I6ZRtt43Qo3m8OfmjkVfBIaNWWvLULlwnJZqIp/WEuI="; - }; - meta.license = lib.licenses.epl20; - }; + redhat.vscode-xml = callPackage ./redhat.vscode-xml { }; redhat.vscode-yaml = buildVscodeMarketplaceExtension { mktplcRef = { diff --git a/pkgs/applications/editors/vscode/extensions/redhat.vscode-xml/default.nix b/pkgs/applications/editors/vscode/extensions/redhat.vscode-xml/default.nix new file mode 100644 index 000000000000..7748faff86b1 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/redhat.vscode-xml/default.nix @@ -0,0 +1,49 @@ +{ + 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 (throw "Unsupported system ${stdenvNoCC.hostPlatform.system}"); + + 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" + ]; + }; +}