diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 806bfa95c1ca..9f565d5cdb0a 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -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 = { diff --git a/pkgs/applications/editors/vscode/extensions/kamadorueda.alejandra/default.nix b/pkgs/applications/editors/vscode/extensions/kamadorueda.alejandra/default.nix new file mode 100644 index 000000000000..a3658346147e --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/kamadorueda.alejandra/default.nix @@ -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 ]; + }; +}