xq-xml: add nix-update-script

This commit is contained in:
Petr Portnov
2026-03-30 14:43:39 +03:00
parent 29a721d448
commit c33de3d997
+9 -10
View File
@@ -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,21 +22,20 @@ 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 = [ lib.maintainers.progrm_jarvis ];
};