From 354e22ca6bc0f86d461e49bfa3ed5ba3e2eaeb0a Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 11 Apr 2024 10:09:22 -0300 Subject: [PATCH] vscode-extensions.timonwong.shellcheck: move to a directory --- .../editors/vscode/extensions/default.nix | 22 +------------ .../timonwong.shellcheck/default.nix | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+), 21 deletions(-) create mode 100644 pkgs/applications/editors/vscode/extensions/timonwong.shellcheck/default.nix diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index ac4c679cbb4d..54bb48f393d7 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -11,7 +11,6 @@ , llvmPackages_14 , protobuf , jq -, shellcheck , moreutils , autoPatchelfHook , zlib @@ -4035,26 +4034,7 @@ let }; }; - timonwong.shellcheck = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "shellcheck"; - publisher = "timonwong"; - version = "0.37.0"; - sha256 = "1d0blynn6c2hz4y9fk7b5wsa3x168gxyycr5d05zqp0rx520m5wc"; - }; - nativeBuildInputs = [ jq moreutils ]; - postInstall = '' - cd "$out/$installPrefix" - jq '.contributes.configuration.properties."shellcheck.executablePath".default = "${shellcheck}/bin/shellcheck"' package.json | sponge package.json - ''; - meta = { - description = "Integrates ShellCheck into VS Code, a linter for Shell scripts"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck"; - homepage = "https://github.com/vscode-shellcheck/vscode-shellcheck"; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.raroh73 ]; - }; - }; + timonwong.shellcheck = callPackage ./timonwong.shellcheck { }; tobiasalthoff.atom-material-theme = buildVscodeMarketplaceExtension { mktplcRef = { diff --git a/pkgs/applications/editors/vscode/extensions/timonwong.shellcheck/default.nix b/pkgs/applications/editors/vscode/extensions/timonwong.shellcheck/default.nix new file mode 100644 index 000000000000..6e93e51bf1e4 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/timonwong.shellcheck/default.nix @@ -0,0 +1,31 @@ +{ + jq, + lib, + moreutils, + shellcheck, + vscode-utils, +}: + +vscode-utils.buildVscodeMarketplaceExtension { + mktplcRef = { + name = "shellcheck"; + publisher = "timonwong"; + version = "0.37.0"; + sha256 = "1d0blynn6c2hz4y9fk7b5wsa3x168gxyycr5d05zqp0rx520m5wc"; + }; + nativeBuildInputs = [ + jq + moreutils + ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties."shellcheck.executablePath".default = "${shellcheck}/bin/shellcheck"' package.json | sponge package.json + ''; + meta = { + description = "Integrates ShellCheck into VS Code, a linter for Shell scripts"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck"; + homepage = "https://github.com/vscode-shellcheck/vscode-shellcheck"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.raroh73 ]; + }; +}