summary refs log tree commit diff
path: root/pkgs/tools/nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/nix')
-rw-r--r--pkgs/tools/nix/statix/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/tools/nix/statix/default.nix b/pkgs/tools/nix/statix/default.nix
new file mode 100644
index 00000000000..cffc2b0029d
--- /dev/null
+++ b/pkgs/tools/nix/statix/default.nix
@@ -0,0 +1,26 @@
+{ lib, rustPlatform, fetchFromGitHub, withJson ? true }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "statix";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "nerdypepper";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Jh3ErzK8vqEdDtZP7O/PAmHQznUTB18nCQwfckFxyLA=";
+  };
+
+  cargoSha256 = "sha256-y+vBHAHTe++tYOWWQ5ioFlprRfDximZE8KSGNNBSPAk=";
+
+  cargoBuildFlags = lib.optionals withJson [ "--features" "json" ];
+
+  cargoCheckFlags = cargoBuildFlags;
+
+  meta = with lib; {
+    description = "Lints and suggestions for the nix programming language";
+    homepage = "https://github.com/nerdypepper/statix";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda nerdypepper ];
+  };
+}