summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-11-12 22:59:55 -0500
committerseth <[email protected]>2023-11-13 05:17:34 +0000
commitd70c0bb78d212cc17ae2075a7f9b8f2b03197eca (patch)
tree62b4beb4c2cd64e510f024c4854e25c9a1d73b59
parentd4e53795ce8e595cca1b2a45a9feed319aee9cb2 (diff)
sarif-fmt: init at 0.4.2
-rw-r--r--pkgs/default.nix1
-rw-r--r--pkgs/sarif-fmt/default.nix56
2 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix
index f77faa6..81c511b 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -22,6 +22,7 @@ in
clang-tidy-sarif = callPackage ./clang-tidy-sarif {inherit (final) clang-tidy-sarif;};
clippy-sarif = callPackage ./clippy-sarif {inherit (final) clippy-sarif;};
hadolint-sarif = callPackage ./hadolint-sarif {inherit (final) hadolint-sarif;};
+ sarif-fmt = callPackage ./sarif-fmt {inherit (final) sarif-fmt;};
klassy = libsForQt5.callPackage ./klassy {};
diff --git a/pkgs/sarif-fmt/default.nix b/pkgs/sarif-fmt/default.nix
new file mode 100644
index 0000000..ff94154
--- /dev/null
+++ b/pkgs/sarif-fmt/default.nix
@@ -0,0 +1,56 @@
+{
+ lib,
+ fetchFromGitHub,
+ rustPlatform,
+ clippy,
+ sarif-fmt,
+ testers,
+ nix-update-script,
+}:
+rustPlatform.buildRustPackage rec {
+ pname = "sarif-fmt";
+ version = "0.4.2";
+
+ src = fetchFromGitHub {
+ owner = "psastras";
+ repo = "sarif-rs";
+ rev = "${pname}-v${version}";
+ hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno=";
+ };
+
+ cargoSha256 = "sha256-dHOxVLXtnqSHMX5r1wFxqogDf9QdnOZOjTyYFahru34=";
+ cargoBuildFlags = ["--package" pname];
+ cargoTestFlags = cargoBuildFlags;
+
+ nativeCheckInputs = [
+ # test_clippy
+ clippy
+ ];
+
+ checkFlags = [
+ # this test uses nix so...no go
+ "--skip=test_clang_tidy"
+ # ditto
+ "--skip=test_hadolint"
+ # ditto
+ "--skip=test_shellcheck"
+ ];
+
+ passthru = {
+ tests.version = testers.testVersion {
+ package = sarif-fmt;
+ };
+
+ updateScript = nix-update-script {
+ extraArgs = ["--regex" "'${pname}-(.*)'"];
+ };
+ };
+
+ meta = with lib; {
+ mainProgram = "sarif-fmt";
+ description = "A CLI tool to pretty print SARIF diagnostics";
+ homepage = "https://psastras.github.io/sarif-rs";
+ maintainers = with maintainers; [getchoo];
+ license = licenses.mit;
+ };
+}