1{
2 jq,
3 lib,
4 moreutils,
5 shfmt,
6 vscode-utils,
7}:
8
9vscode-utils.buildVscodeMarketplaceExtension {
10 mktplcRef = {
11 name = "shell-format";
12 publisher = "foxundermoon";
13 version = "7.2.5";
14 hash = "sha256-kfpRByJDcGY3W9+ELBzDOUMl06D/vyPlN//wPgQhByk=";
15 };
16
17 nativeBuildInputs = [
18 jq
19 moreutils
20 ];
21
22 postInstall = ''
23 cd "$out/$installPrefix"
24 jq '.contributes.configuration.properties."shellformat.path".default = "${shfmt}/bin/shfmt"' package.json | sponge package.json
25 '';
26
27 meta = {
28 downloadPage = "https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format";
29 homepage = "https://github.com/foxundermoon/vs-shell-format";
30 license = lib.licenses.mit;
31 maintainers = [ lib.maintainers.dbirks ];
32 };
33}