summary refs log tree commit diff
diff options
context:
space:
mode:
authorKevin Amado <kamadorueda@gmail.com>2022-02-12 19:56:52 -0500
committerJonathan Ringer <jonringer@users.noreply.github.com>2022-02-13 09:31:40 -0800
commit8bd4ebee3289ad387903d38828bd6f12edbc7210 (patch)
treec27d8d049a2e6516256821bc0ae551481db267bf
parent1cb2d4c19f5948e10041c8af77f4c439cfc53445 (diff)
downloadnixpkgs-8bd4ebee3289ad387903d38828bd6f12edbc7210.tar
nixpkgs-8bd4ebee3289ad387903d38828bd6f12edbc7210.tar.gz
nixpkgs-8bd4ebee3289ad387903d38828bd6f12edbc7210.tar.bz2
nixpkgs-8bd4ebee3289ad387903d38828bd6f12edbc7210.tar.lz
nixpkgs-8bd4ebee3289ad387903d38828bd6f12edbc7210.tar.xz
nixpkgs-8bd4ebee3289ad387903d38828bd6f12edbc7210.tar.zst
nixpkgs-8bd4ebee3289ad387903d38828bd6f12edbc7210.zip
vscode-extensions.kamadorueda.alejandra: init at 1.0.0
-rw-r--r--pkgs/misc/vscode-extensions/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/misc/vscode-extensions/default.nix b/pkgs/misc/vscode-extensions/default.nix
index 54081b4c740..3db0f9d9526 100644
--- a/pkgs/misc/vscode-extensions/default.nix
+++ b/pkgs/misc/vscode-extensions/default.nix
@@ -14,6 +14,7 @@
 , moreutils
 , racket-minimal
 , clojure-lsp
+, alejandra
 }:
 
 let
@@ -1231,6 +1232,34 @@ let
         };
       };
 
+      kamadorueda.alejandra = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "alejandra";
+          publisher = "kamadorueda";
+          version = "1.0.0";
+          sha256 = "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 = with lib; {
+          description = "The Uncompromising Nix Code Formatter";
+          homepage = "https://github.com/kamadorueda/alejandra";
+          license = licenses.unlicense;
+          maintainers = with maintainers; [ kamadorueda ];
+        };
+      };
+
       kubukoz.nickel-syntax = buildVscodeMarketplaceExtension {
         mktplcRef = {
           name = "nickel-syntax";