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 See the release notes of
[v1.7.0](https://github.com/jtroo/kanata/releases/tag/v1.7.0) [v1.7.0](https://github.com/jtroo/kanata/releases/tag/v1.7.0)
for more information. 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` - the notmuch vim plugin now lives in a separate output of the `notmuch`
package. Installing `notmuch` will not bring the notmuch vim package anymore, package. Installing `notmuch` will not bring the notmuch vim package anymore,

View File

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

View File

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