diff --git a/pkgs/by-name/fb/fblog/package.nix b/pkgs/by-name/fb/fblog/package.nix index b2c0b8e8daaa..b553c25d43c7 100644 --- a/pkgs/by-name/fb/fblog/package.nix +++ b/pkgs/by-name/fb/fblog/package.nix @@ -2,26 +2,32 @@ lib, rustPlatform, fetchFromGitHub, + versionCheckHook, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "fblog"; version = "4.16.0"; src = fetchFromGitHub { owner = "brocode"; repo = "fblog"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-SWwk7qNe2R1aBYGBFqltUZjeOvr4jG1P7/CPIAfHCc8="; }; cargoHash = "sha256-du9FXuUNqQm1AMqcCFqeso5OPrPCxzTVl5e7kR0rpwc="; - meta = with lib; { + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + + meta = { description = "Small command-line JSON log viewer"; mainProgram = "fblog"; homepage = "https://github.com/brocode/fblog"; - license = licenses.wtfpl; - maintainers = [ maintainers.progrm_jarvis ]; + changelog = "https://github.com/brocode/fblog/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.wtfpl; + maintainers = [ lib.maintainers.progrm_jarvis ]; }; -} +})