From 9cb732179e234045c7b8906fd0b046943cbb039c Mon Sep 17 00:00:00 2001 From: seth Date: Thu, 9 Nov 2023 21:50:19 -0500 Subject: [PATCH] hadolint-sarif: init at 0.4.2 --- pkgs/by-name/ha/hadolint-sarif/package.nix | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pkgs/by-name/ha/hadolint-sarif/package.nix diff --git a/pkgs/by-name/ha/hadolint-sarif/package.nix b/pkgs/by-name/ha/hadolint-sarif/package.nix new file mode 100644 index 000000000000..bf8f43429633 --- /dev/null +++ b/pkgs/by-name/ha/hadolint-sarif/package.nix @@ -0,0 +1,37 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + hadolint-sarif, + testers, +}: +rustPlatform.buildRustPackage rec { + pname = "hadolint-sarif"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "psastras"; + repo = "sarif-rs"; + rev = "hadolint-sarif-v${version}"; + hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno="; + }; + + cargoHash = "sha256-AMRL1XANyze8bJe3fdgZvBnl/NyuWP13jixixqiPmiw="; + cargoBuildFlags = [ + "--package" + "hadolint-sarif" + ]; + cargoTestFlags = cargoBuildFlags; + + passthru = { + tests.version = testers.testVersion { package = hadolint-sarif; }; + }; + + meta = { + description = "A CLI tool to convert hadolint diagnostics into SARIF"; + homepage = "https://psastras.github.io/sarif-rs"; + mainProgram = "hadolint-sarif"; + maintainers = with lib.maintainers; [ getchoo ]; + license = lib.licenses.mit; + }; +}