From dac0d8be656176eafe607427bc56d643364fef0d Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Fri, 27 Mar 2020 22:04:59 -0400 Subject: [PATCH] vscode-utils: allow direct vsix source --- pkgs/misc/vscode-extensions/vscode-utils.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/vscode-extensions/vscode-utils.nix b/pkgs/misc/vscode-extensions/vscode-utils.nix index df8f24fcce73..5d446b025d7a 100644 --- a/pkgs/misc/vscode-extensions/vscode-utils.nix +++ b/pkgs/misc/vscode-extensions/vscode-utils.nix @@ -51,12 +51,15 @@ let buildVscodeMarketplaceExtension = a@{ name ? "", src ? null, + vsix ? null, mktplcRef, ... }: assert "" == name; assert null == src; - buildVscodeExtension ((removeAttrs a [ "mktplcRef" ]) // { + buildVscodeExtension ((removeAttrs a [ "mktplcRef" "vsix" ]) // { name = "${mktplcRef.publisher}-${mktplcRef.name}-${mktplcRef.version}"; - src = fetchVsixFromVscodeMarketplace mktplcRef; + src = if (vsix != null) + then vsix + else fetchVsixFromVscodeMarketplace mktplcRef; vscodeExtUniqueId = "${mktplcRef.publisher}.${mktplcRef.name}"; });