diff --git a/pkgs/by-name/xq/xq-xml/package.nix b/pkgs/by-name/xq/xq-xml/package.nix index 8ae50c91c5c6..5b806abd8649 100644 --- a/pkgs/by-name/xq/xq-xml/package.nix +++ b/pkgs/by-name/xq/xq-xml/package.nix @@ -2,8 +2,8 @@ lib, buildGoModule, fetchFromGitHub, - testers, - xq-xml, + versionCheckHook, + nix-update-script, }: buildGoModule (finalAttrs: { @@ -13,7 +13,7 @@ buildGoModule (finalAttrs: { src = fetchFromGitHub { owner = "sibprogrammer"; repo = "xq"; - rev = "v${finalAttrs.version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-6iC5YhCppzlyp6o+Phq98gQj4LjQx/5pt2+ejOvGvTE="; }; @@ -22,22 +22,21 @@ buildGoModule (finalAttrs: { ldflags = [ "-s" "-w" - "-X=main.commit=${finalAttrs.src.rev}" + "-X=main.commit=v${finalAttrs.version}" "-X=main.version=${finalAttrs.version}" ]; - passthru.tests = { - version = testers.testVersion { - package = xq-xml; - }; - }; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + + passthru.updateScript = nix-update-script { }; meta = { description = "Command-line XML and HTML beautifier and content extractor"; mainProgram = "xq"; homepage = "https://github.com/sibprogrammer/xq"; - changelog = "https://github.com/sibprogrammer/xq/releases/tag/${finalAttrs.src.rev}"; + changelog = "https://github.com/sibprogrammer/xq/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; - maintainers = [ ]; + maintainers = [ lib.maintainers.progrm_jarvis ]; }; })