vscode-extensions.kamadorueda.alejandra: move to a directory

This commit is contained in:
superherointj 2024-04-11 09:44:02 -03:00
parent 3ac536f66b
commit e62a408834
2 changed files with 39 additions and 28 deletions

View File

@ -14,7 +14,6 @@
, jq
, shellcheck
, moreutils
, alejandra
, shfmt
, typst-lsp
, typst-preview
@ -2428,33 +2427,7 @@ let
};
};
kamadorueda.alejandra = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "alejandra";
publisher = "kamadorueda";
version = "1.0.0";
hash = "sha256-COlEjKhm8tK5XfOjrpVUDQ7x3JaOLiYoZ4MdwTL8ktk=";
};
nativeBuildInputs = [ jq moreutils ];
postInstall = ''
cd "$out/$installPrefix"
jq -e '
.contributes.configuration.properties."alejandra.program".default =
"${alejandra}/bin/alejandra" |
.contributes.configurationDefaults."alejandra.program" =
"${alejandra}/bin/alejandra"
' \
< package.json \
| sponge package.json
'';
meta = {
description = "The Uncompromising Nix Code Formatter";
homepage = "https://github.com/kamadorueda/alejandra";
license = lib.licenses.unlicense;
maintainers = [ lib.maintainers.kamadorueda ];
};
};
kamadorueda.alejandra = callPackage ./kamadorueda.alejandra { };
kamikillerto.vscode-colorize = buildVscodeMarketplaceExtension {
mktplcRef = {

View File

@ -0,0 +1,38 @@
{
alejandra,
jq,
lib,
moreutils,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "alejandra";
publisher = "kamadorueda";
version = "1.0.0";
hash = "sha256-COlEjKhm8tK5XfOjrpVUDQ7x3JaOLiYoZ4MdwTL8ktk=";
};
nativeBuildInputs = [
jq
moreutils
];
postInstall = ''
cd "$out/$installPrefix"
jq -e '
.contributes.configuration.properties."alejandra.program".default =
"${alejandra}/bin/alejandra" |
.contributes.configurationDefaults."alejandra.program" =
"${alejandra}/bin/alejandra"
' \
< package.json \
| sponge package.json
'';
meta = {
description = "The Uncompromising Nix Code Formatter";
homepage = "https://github.com/kamadorueda/alejandra";
license = lib.licenses.unlicense;
maintainers = [ lib.maintainers.kamadorueda ];
};
}