about summary refs log tree commit diff
path: root/pkgs/applications/editors/vscode/extensions/foxundermoon.shell-format/default.nix
blob: 51824f34ff6e951997d067aee8cf9afc767e1dc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  jq,
  lib,
  moreutils,
  shfmt,
  vscode-utils,
}:

vscode-utils.buildVscodeMarketplaceExtension {
  mktplcRef = {
    name = "shell-format";
    publisher = "foxundermoon";
    version = "7.2.5";
    hash = "sha256-kfpRByJDcGY3W9+ELBzDOUMl06D/vyPlN//wPgQhByk=";
  };

  nativeBuildInputs = [
    jq
    moreutils
  ];

  postInstall = ''
    cd "$out/$installPrefix"
    jq '.contributes.configuration.properties."shellformat.path".default = "${shfmt}/bin/shfmt"' package.json | sponge package.json
  '';

  meta = {
    downloadPage = "https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format";
    homepage = "https://github.com/foxundermoon/vs-shell-format";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.dbirks ];
  };
}