about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAleksana <me@aleksana.moe>2024-05-18 01:55:49 +0800
committerGitHub <noreply@github.com>2024-05-18 01:55:49 +0800
commitd769131c2703094f9c78fe74c09606173c38e6df (patch)
treec5c0866972d31935f8d862a495eccf47201fc7a5
parent9c4874ae8c220c1fa54e01f6a6edc4c4208d3871 (diff)
parente26bfee964c393ecfb01de7486dd2b65def79b49 (diff)
Merge pull request #266575 from getchoo/pkgs/shellcheck-sarif/init
shellcheck-sarif: init at 0.4.2
-rw-r--r--pkgs/by-name/sh/shellcheck-sarif/package.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/by-name/sh/shellcheck-sarif/package.nix b/pkgs/by-name/sh/shellcheck-sarif/package.nix
new file mode 100644
index 0000000000000..83492cfd39f8f
--- /dev/null
+++ b/pkgs/by-name/sh/shellcheck-sarif/package.nix
@@ -0,0 +1,37 @@
+{
+  lib,
+  fetchFromGitHub,
+  rustPlatform,
+  shellcheck-sarif,
+  testers,
+}:
+rustPlatform.buildRustPackage rec {
+  pname = "shellcheck-sarif";
+  version = "0.4.2";
+
+  src = fetchFromGitHub {
+    owner = "psastras";
+    repo = "sarif-rs";
+    rev = "${pname}-v${version}";
+    hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno=";
+  };
+
+  cargoHash = "sha256-JuE/Z0qrS/3BRlb0jTGDfV0TYk74Q75X1wv/IERxqeQ=";
+  cargoBuildFlags = [
+    "--package"
+    pname
+  ];
+  cargoTestFlags = cargoBuildFlags;
+
+  passthru = {
+    tests.version = testers.testVersion { package = shellcheck-sarif; };
+  };
+
+  meta = {
+    description = "A CLI tool to convert shellcheck diagnostics into SARIF";
+    homepage = "https://psastras.github.io/sarif-rs";
+    mainProgram = "shellcheck-sarif";
+    maintainers = with lib.maintainers; [ getchoo ];
+    license = lib.licenses.mit;
+  };
+}