vscode-extensions: set pname (#354740)

This commit is contained in:
jopejoe1 2024-11-25 19:46:24 +01:00 committed by GitHub
commit 1ff4137a05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 6 deletions

View File

@ -36,6 +36,7 @@
See the release notes of
[v1.7.0](https://github.com/jtroo/kanata/releases/tag/v1.7.0)
for more information.
- `vscode-utils.buildVscodeExtension` now requires pname as an argument
- the notmuch vim plugin now lives in a separate output of the `notmuch`
package. Installing `notmuch` will not bring the notmuch vim package anymore,

View File

@ -72,8 +72,7 @@ let
};
in
vscode-utils.buildVscodeExtension {
inherit version vsix;
name = "${pname}-${version}";
inherit version vsix pname;
src = "${vsix}/${pname}.zip";
vscodeExtUniqueId = "${publisher}.${pname}";
vscodeExtPublisher = publisher;

View File

@ -11,7 +11,7 @@
let
buildVscodeExtension =
a@{
name,
pname,
src,
# Same as "Unique Identifier" on the extension's web page.
# For the moment, only serve as unique extension dir.
@ -33,10 +33,13 @@ let
...
}:
stdenv.mkDerivation (
(removeAttrs a [ "vscodeExtUniqueId" ])
(removeAttrs a [
"vscodeExtUniqueId"
"pname"
])
// {
name = "vscode-extension-${name}";
pname = "vscode-extension-${pname}";
passthru = passthru // {
inherit vscodeExtPublisher vscodeExtName vscodeExtUniqueId;
@ -88,7 +91,7 @@ let
"vsix"
])
// {
name = "${mktplcRef.publisher}-${mktplcRef.name}-${mktplcRef.version}";
pname = "${mktplcRef.publisher}-${mktplcRef.name}";
version = mktplcRef.version;
src = if (vsix != null) then vsix else fetchVsixFromVscodeMarketplace mktplcRef;
vscodeExtPublisher = mktplcRef.publisher;