mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
sarif-fmt: init at 0.4.2
This commit is contained in:
parent
9003065c88
commit
5e7cc9a640
1 changed files with 58 additions and 0 deletions
58
pkgs/by-name/sa/sarif-fmt/package.nix
Normal file
58
pkgs/by-name/sa/sarif-fmt/package.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
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 = "sarif-fmt-v${version}";
|
||||
hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-dHOxVLXtnqSHMX5r1wFxqogDf9QdnOZOjTyYFahru34=";
|
||||
cargoBuildFlags = [
|
||||
"--package"
|
||||
"sarif-fmt"
|
||||
];
|
||||
cargoTestFlags = cargoBuildFlags;
|
||||
|
||||
# `test_clippy` (the only test we enable) is broken on Darwin
|
||||
# because `--enable-profiler` is not enabled in rustc on Darwin
|
||||
# error[E0463]: can't find crate for profiler_builtins
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
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; };
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A CLI tool to pretty print SARIF diagnostics";
|
||||
homepage = "https://psastras.github.io/sarif-rs";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ getchoo ];
|
||||
mainProgram = "sarif-fmt";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue