diff --git a/pkgs/development/tools/snazy/default.nix b/pkgs/development/tools/snazy/default.nix new file mode 100644 index 000000000000..c284c18d015d --- /dev/null +++ b/pkgs/development/tools/snazy/default.nix @@ -0,0 +1,34 @@ +{ lib, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "snazy"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "chmouel"; + repo = pname; + rev = version; + sha256 = "sha256-Pv+vLdbMTbDbdUVQhA07WY+o1PwtCiqdAXCj+UlP/ZQ="; + }; + cargoSha256 = "sha256-96xgpkkWHsyb3kxEXM5f5jFSjbO+VEmX2uHltGJUPGk="; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + $out/bin/snazy --help + $out/bin/snazy --version | grep "snazy ${version}" + runHook postInstallCheck + ''; + + meta = with lib; { + homepage = "https://github.com/chmouel/snazy/"; + changelog = "https://github.com/chmouel/snazy/releases/tag/v${version}"; + description = "A snazzy json log viewer"; + longDescription = '' + Snazy is a simple tool to parse json logs and output them in a nice format + with nice colors. + ''; + license = licenses.asl20; + maintainers = with maintainers; [ jk ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index af7a375696e7..a35a3721762e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4119,6 +4119,8 @@ with pkgs; simg2img = callPackage ../tools/filesystems/simg2img { }; + snazy = callPackage ../development/tools/snazy { }; + snippetpixie = callPackage ../tools/text/snippetpixie { }; snowcat = callPackage ../tools/security/snowcat { };