Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode-extensions: detect vsix sources and generate packages automatically #353

Closed
wants to merge 1 commit into from
Closed

vscode-extensions: detect vsix sources and generate packages automatically #353

wants to merge 1 commit into from

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