void-packages
void-packages copied to clipboard
New package: xq-1.2.4
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
- This new package conforms to the package requirements: YES
Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
There might be an issue with conflicting binary name with xq
from xtools
.
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 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.