app-misc/xq - 1.5.1 (nest)

Search

Install

Install this version:

emerge -a =app-misc/xq-1.5.1

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =app-misc/xq-1.5.1

Or alternatively:

emerge --autounmask-write -a =app-misc/xq-1.5.1

Package Information

Description:
Command-line JSON processor for binary data
Homepage:
https://github.com/sibprogrammer/xq
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
1.5.1 9 ~amd64 ~x86 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=9

inherit go-module

COMMIT="9803fc9"

DESCRIPTION="Command-line JSON processor for binary data"
HOMEPAGE="https://github.com/sibprogrammer/xq"
SRC_URI="https://github.com/sibprogrammer/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
	https://github.com/SpiderX/portage-overlay/releases/download/${P}/${P}-deps.tar.xz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"

BDEPEND=">=dev-lang/go-1.26.1"

src_prepare() {
	default

	# rename reference (app-misc/yq)
	sed -i '/Use:/s|xq|xxq|' cmd/root.go || die "sed failed for root.go"
	# rename man
	sed -i 's/xq/xxq/;s/XQ/XXQ/' docs/xq.man || die "sed failed for xq.man"
}

src_compile() {
	DATE="$(date -u '+%Y-%m-%d-%H%M UTC')"
	LDFLAGS="-X main.version=${PV} -X \"main.date=${DATE}\" -X main.commit=${COMMIT}"
	ego build -ldflags "${LDFLAGS}"
}

src_test() {
	ego test -v ./...
}

src_install() {
	einstalldocs
	newbin xq xxq
	newman docs/xq.man xxq.1
}

Inherited Eclasses

Dependencies

BDEPEND

>=dev-lang/go-1.26.1

Manifest for 1.5.1

Type File Size Source URLs
DIST xq-1.5.1-deps.tar.xz 5893596 bytes https://github.com/SpiderX/portage-overlay/releases/download/xq-1.5.1/xq-1.5.1-deps.tar.xz
DIST xq-1.5.1.tar.gz 161599 bytes https://github.com/sibprogrammer/xq/archive/v1.5.1.tar.gz