summaryrefslogtreecommitdiff
path: root/pkgs/hadolint-sarif
diff options
context:
space:
mode:
authorseth <[email protected]>2023-11-12 22:59:44 -0500
committerseth <[email protected]>2023-11-13 05:17:34 +0000
commitd4e53795ce8e595cca1b2a45a9feed319aee9cb2 (patch)
tree93a569df56ddba2c351a3c770652ea703063af0c /pkgs/hadolint-sarif
parentd34f230739d01276053a6e02197970bc0a2e0356 (diff)
hadolint-sarif: init at 0.4.2
Diffstat (limited to 'pkgs/hadolint-sarif')
-rw-r--r--pkgs/hadolint-sarif/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/hadolint-sarif/default.nix b/pkgs/hadolint-sarif/default.nix
new file mode 100644
index 0000000..9675279
--- /dev/null
+++ b/pkgs/hadolint-sarif/default.nix
@@ -0,0 +1,41 @@
+{
+ lib,
+ fetchFromGitHub,
+ rustPlatform,
+ hadolint-sarif,
+ testers,
+ nix-update-script,
+}:
+rustPlatform.buildRustPackage rec {
+ pname = "hadolint-sarif";
+ version = "0.4.2";
+
+ src = fetchFromGitHub {
+ owner = "psastras";
+ repo = "sarif-rs";
+ rev = "${pname}-v${version}";
+ hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno=";
+ };
+
+ cargoSha256 = "sha256-AMRL1XANyze8bJe3fdgZvBnl/NyuWP13jixixqiPmiw=";
+ cargoBuildFlags = ["--package" pname];
+ cargoTestFlags = cargoBuildFlags;
+
+ passthru = {
+ tests.version = testers.testVersion {
+ package = hadolint-sarif;
+ };
+
+ updateScript = nix-update-script {
+ extraArgs = ["--regex" "'${pname}-(.*)'"];
+ };
+ };
+
+ meta = with lib; {
+ mainProgram = "hadolint-sarif";
+ description = "A CLI tool to convert hadolint diagnostics into SARIF";
+ homepage = "https://psastras.github.io/sarif-rs";
+ maintainers = with maintainers; [getchoo];
+ license = licenses.mit;
+ };
+}