Skip to content

Conversation

danielphan2003
Copy link

Looking at PR #348, I notice that we can improve how vscode-extensions handles generated vsix source in pkgs/sources.toml.

This PR aims to mkVscodeExtension with auto-generated meta attributes and passthru values such as meta.homepage, meta.downloadPage, meta.changelog, meta.license, meta.maintainers, meta.platforms, {drv}Phase, etc.

Therefore, the following code snippet can be simplified into:

[vscode-LiveServer]
src.openvsx = "ritwickdey.LiveServer"
fetch.openvsx = "ritwickdey.LiveServer"
passthru = { license = "mit", homepage = "https://github.com/ritwickdey/vscode-live-server", description = "Launch a development local Server with live reload feature for static & dynamic pages" }

The passthru can be generated through bud script, although I will need to test more of this later.

Comment on lines +10 to +14
isVsix = hasSuffix ".vsix";

isVsixPackage = hasSuffix ".VSIXPackage";

isVscodeExt = name: (isVsix name) || (isVsixPackage name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@@ -0,0 +1,11 @@
{ lib, vscode-utils, sources }:
let
inherit (vscode-utils) isVscodeExt mkVscodeExtensions;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those look like convenience library functions that we might want to discuss adding in digga?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or alternatively a divnix/vsext (to decouple release cycles)!!!

@blaggacao
Copy link
Contributor

IMO, also bud complements can exquisitely live in a divnix/vsext.

@danielphan2003
Copy link
Author

Superseeded by https://github.com/divnix/devos-ext-lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants