about summary refs log tree commit diff
path: root/pkgs/by-name/sh/shellcheck-sarif/package.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-05-17 18:01:08 +0000
committerGitHub <noreply@github.com>2024-05-17 18:01:08 +0000
commitc537cc4af4c297b69441ae95e8f96a00fbcead59 (patch)
treed35e1b7a70d4e1ee46042011e4901d4a6f3864e7 /pkgs/by-name/sh/shellcheck-sarif/package.nix
parentcb8fa2b758f8b3f5b7dfacf46d877ef1635938ea (diff)
parentd769131c2703094f9c78fe74c09606173c38e6df (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/by-name/sh/shellcheck-sarif/package.nix')
-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;
+  };
+}