From 6badd9fe8481a31c1a8b69fe8ef99174674fa02c Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 11 Apr 2024 09:47:41 -0300 Subject: [PATCH] vscode-extensions.foxundermoon.shell-format: move to a directory --- .../editors/vscode/extensions/default.nix | 24 +------------- .../foxundermoon.shell-format/default.nix | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 23 deletions(-) create mode 100644 pkgs/applications/editors/vscode/extensions/foxundermoon.shell-format/default.nix diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 9f565d5cdb0a..4b56f18025d3 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -14,7 +14,6 @@ , jq , shellcheck , moreutils -, shfmt , typst-lsp , typst-preview , autoPatchelfHook @@ -1687,28 +1686,7 @@ let }; }; - foxundermoon.shell-format = 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 ]; - }; - }; + foxundermoon.shell-format = callPackage ./foxundermoon.shell-format { }; freebroccolo.reasonml = buildVscodeMarketplaceExtension { meta = { diff --git a/pkgs/applications/editors/vscode/extensions/foxundermoon.shell-format/default.nix b/pkgs/applications/editors/vscode/extensions/foxundermoon.shell-format/default.nix new file mode 100644 index 000000000000..51824f34ff6e --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/foxundermoon.shell-format/default.nix @@ -0,0 +1,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 ]; + }; +}