diff options
| author | seth <[email protected]> | 2023-12-24 04:20:53 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-12-24 05:18:20 -0500 |
| commit | 0fc48fd45f756534648d989f5a2c4f3060464218 (patch) | |
| tree | 41293f12d3de3bd9f186785242b96addcc4d30b1 /pkgs/sarif-fmt.nix | |
| parent | 20993feb4a35eb279beab4a7af2c993f5fb620ce (diff) | |
pkgs: auto-import directories *and* files
Diffstat (limited to 'pkgs/sarif-fmt.nix')
| -rw-r--r-- | pkgs/sarif-fmt.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/sarif-fmt.nix b/pkgs/sarif-fmt.nix new file mode 100644 index 0000000..451af0c --- /dev/null +++ b/pkgs/sarif-fmt.nix @@ -0,0 +1,56 @@ +{ + lib, + stdenv, + fetchFromGitHub, + rustPlatform, + clippy, + sarif-fmt, + testers, +}: +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 = lib.optionals stdenv.isLinux [ + # test_clippy + clippy + ]; + + checkFlags = + [ + # this test uses nix so...no go + "--skip=test_clang_tidy" + # ditto + "--skip=test_hadolint" + # ditto + "--skip=test_shellcheck" + ] + ++ lib.optionals stdenv.isDarwin [ + "--skip=test_clippy" + ]; + + passthru = { + tests.version = testers.testVersion { + package = sarif-fmt; + }; + }; + + 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; + }; +} |
