void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

New package: xq-1.2.4

Open realcharmer opened this issue 10 months ago • 3 comments

XQ is a parser for XML and HTML similar to what JQ does for JSON.

https://github.com/sibprogrammer/xq

Testing the changes

  • I tested the changes in this PR: YES

New package

Local build testing

  • I built this PR locally for my native architecture, (x86_64-glibc)

realcharmer avatar Apr 18 '24 07:04 realcharmer

There might be an issue with conflicting binary name with xq from xtools.

realcharmer avatar Apr 18 '24 07:04 realcharmer

Tested on x86_64-glibc and works as expected Tried getting the RSS feed of a youtube channel and it works

curl -L 'https://www.youtube.com/@billiam/videos' | xq-go -m -q "link[title=RSS]" -a href

Made some small adjustments locally as well as to not conflict to anything for me, though I'm not sure what the correct course of action is in this scenario

diff --git a/srcpkgs/xq/template b/srcpkgs/xq/template
index 60ce890b014..be2c7faf460 100644
--- a/srcpkgs/xq/template
+++ b/srcpkgs/xq/template
@@ -11,6 +11,12 @@ homepage="https://github.com/sibprogrammer/xq"
 distfiles="https://github.com/sibprogrammer/xq/archive/refs/tags/v${version}.tar.gz"
 checksum=5044de231d2426c236618e52d3d2e59cd45b008e55d5dfa8df97c3269c64354d
 
+do_check() {
+	go test -covermode=atomic -v ./...
+}
+
 post_install() {
+	mv "$DESTDIR/usr/bin/"{xq,xq-go}
+	vman docs/xq.man xq-go.1
 	vlicense LICENSE
 }

AnInternetTroll avatar May 09 '24 11:05 AnInternetTroll

@AnInternetTroll thanks for the patch, I've added your changes. Although I still don't fancy renaming the binary, as it will definitely cause compatibility issues with existing scripts. Least we could do is to print a notification about this fact during installation, but I'd prefer keeping the original binary name if possible.

realcharmer avatar May 09 '24 12:05 realcharmer