summaryrefslogtreecommitdiff
path: root/pkgs/clang-tidy-sarif
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/clang-tidy-sarif')
-rw-r--r--pkgs/clang-tidy-sarif/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/clang-tidy-sarif/default.nix b/pkgs/clang-tidy-sarif/default.nix
new file mode 100644
index 0000000..6001106
--- /dev/null
+++ b/pkgs/clang-tidy-sarif/default.nix
@@ -0,0 +1,41 @@
+{
+ lib,
+ fetchFromGitHub,
+ rustPlatform,
+ clang-tidy-sarif,
+ testers,
+ nix-update-script,
+}:
+rustPlatform.buildRustPackage rec {
+ pname = "clang-tidy-sarif";
+ version = "0.4.2";
+
+ src = fetchFromGitHub {
+ owner = "psastras";
+ repo = "sarif-rs";
+ rev = "${pname}-v${version}";
+ hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno=";
+ };
+
+ cargoSha256 = "sha256-NzdgfHRDgLB6sMhBflk9rACEocLP23KlZL22iAfBfh8=";
+ cargoBuildFlags = ["--package" pname];
+ cargoTestFlags = cargoBuildFlags;
+
+ passthru = {
+ tests.version = testers.testVersion {
+ package = clang-tidy-sarif;
+ };
+
+ updateScript = nix-update-script {
+ extraArgs = ["--regex" "'${pname}-(.*)'"];
+ };
+ };
+
+ meta = with lib; {
+ mainProgram = "clang-tidy-sarif";
+ description = "A CLI tool to convert clang-tidy diagnostics into SARIF";
+ homepage = "https://psastras.github.io/sarif-rs";
+ maintainers = with maintainers; [getchoo];
+ license = licenses.mit;
+ };
+}