repo/proj/guru:master commit in: dev-util/grok-build/

"Florian Schmaus" <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786693531.c7eff6ae24189621f422eca69707bba5319cee54.flow@gentoo>
commit:     c7eff6ae24189621f422eca69707bba5319cee54
Author:     Florian Albrechtskirchinger <falbrechtskirchinger <AT> gmail <DOT> com>
AuthorDate: Fri Aug 14 07:45:31 2026 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Aug 14 07:45:31 2026 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c7eff6ae

dev-util/grok-build: add 1.0.3

Signed-off-by: Florian Albrechtskirchinger <falbrechtskirchinger <AT> gmail.com>

 dev-util/grok-build/Manifest                |   2 +
 dev-util/grok-build/grok-build-1.0.3.ebuild | 112 ++++++++++++++++++++++++++++
 2 files changed, 114 insertions(+)

diff --git a/dev-util/grok-build/Manifest b/dev-util/grok-build/Manifest
index 74b1ff005e..22118efcc3 100644
--- a/dev-util/grok-build/Manifest
+++ b/dev-util/grok-build/Manifest
@@ -1,4 +1,6 @@
 DIST async-openai-95b52ebdedf42143083cf3d6f0e0be7c84e9c808.gh.tar.gz 28205999 BLAKE2B efc04b410749efc8f6e607e8f0dc5162070c47d7c8b61317185fe638f66b6441f08e6d72b5f8237e9ea448c3b750dba4222dab1d092de5f561a0d36478886eda SHA512 9ce341a035dd11070c7b24e03ab0ad0e21f8e49426626f84e22eac716054c47c01ef7b84147231908c999bee46af54007772c0fd53759f68846c752d3dd28652
 DIST grok-build-1.0.0-crates.tar.xz 91686332 BLAKE2B 316dc33207b5c883d2a524ca61add3274807d1039923673db51d3ed7593ae6150f9bac3eba83d2f1bb852fe14b81be0c7b98e11ab7c2fbae2a94bb2f2c0e1d96 SHA512 de915725d8ba4adfab4c58e027d44bac5fc46f6ba64050d8d81df2a5a15ead361fca2be406a2f47dd7b2d388644e5bc55486096f416fc07ba47ee707e071654d
 DIST grok-build-1.0.0.gh.tar.gz 13765047 BLAKE2B 8c2f1180b6a1ebf2874d657a01c3d293197755ef6925bef3dc4119d15d6936ed17af159fea9759f89066385a47601375731a34f0653a20f3eaacdfd9f127bd5d SHA512 9d5334376e1573c517ba13abbdf540755cf5fe3e490e4881de8f547a7333a3a4ad25d1ed740a51c4812718d2753328e93b8f32b15955b801b50fff1854127ee9
+DIST grok-build-1.0.3-crates.tar.xz 91677468 BLAKE2B 3018b0ab4c7c135dff4f30f5c0479e9e8e2330c4787038de788184f4d5c89953bc578ffbb6d714f8ddd680048c2270074d8d1ea8eccae825923036e694ea0fbe SHA512 1c7efed8950889b57d17ccd881ca3113894f313ba11d8dc4f435edfc6c61cfcbaa08b0ef0824ae09901cb961a281709affeb329d5f641d88de2ca40f6923f54d
+DIST grok-build-1.0.3.gh.tar.gz 14198915 BLAKE2B 8c97851b5bb1f8815d39a3990f457567aa97ce8a0968e43061e2e0c9c147b5418d7a57ea3d93b96b2b008264eb5c044f92245848fbf0bb6bc2d42e1a51720923 SHA512 08728c0f14839439d71d8f69fd2abe185d391a6b8135c1b6cfbb57f1ff1b6308f73a61b360f385a39fd311c6931fbc05ea722abe6900b89d6cff268136339882
 DIST nucleo-5b74652e482f7c07d827f18c6d21e7540c242c69.gh.tar.gz 86764 BLAKE2B 006ac7e8c4c7e35a9fd690cd699c7c6d45f9368ed5ac8e1ad2b098128b530ef1f72aeccc6e87dd7d84f98b402f72313be8716f1eeae954b25898359f1037b41a SHA512 a8762638ef79da9dc344664342779c9aecb1b19facc23614d87b639d21b356aab3715cbdb51e541b7dd569a2d4e5cbf97591d4341e3ae538e5aa4a620f4f72f6

diff --git a/dev-util/grok-build/grok-build-1.0.3.ebuild b/dev-util/grok-build/grok-build-1.0.3.ebuild
new file mode 100644
index 0000000000..2e0114b0c7
--- /dev/null
+++ b/dev-util/grok-build/grok-build-1.0.3.ebuild
@@ -0,0 +1,112 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Autogenerated by pycargoebuild 0.16.0
+
+EAPI=8
+
+RUST_MIN_VER="1.92.0"
+
+CRATES="
+"
+
+declare -A GIT_CRATES=(
+	[async-openai-macros]='https://github.com/our-forks/async-openai;95b52ebdedf42143083cf3d6f0e0be7c84e9c808;async-openai-%commit%/async-openai-macros'
+	[async-openai]='https://github.com/our-forks/async-openai;95b52ebdedf42143083cf3d6f0e0be7c84e9c808;async-openai-%commit%/async-openai'
+	[nucleo-matcher]='https://github.com/helix-editor/nucleo;5b74652e482f7c07d827f18c6d21e7540c242c69;nucleo-%commit%/matcher'
+	[nucleo]='https://github.com/helix-editor/nucleo;5b74652e482f7c07d827f18c6d21e7540c242c69;nucleo-%commit%'
+)
+
+inherit cargo check-reqs shell-completion
+
+# no tagged releases
+MY_COMMIT="3df81d4b94af68e6baf6b593e9cae26b3ac84313"
+DESCRIPTION="SpaceXAI's coding agent harness and TUI"
+HOMEPAGE="
+	https://x.ai/cli
+	https://x.ai/open-source
+	https://github.com/xai-org/grok-build
+"
+SRC_URI="
+	https://github.com/xai-org/${PN}/archive/${MY_COMMIT}.tar.gz -> ${P}.gh.tar.gz
+	https://github.com/fasys-crate-dist/${PN}/releases/download/v${PV}/${P}-crates.tar.xz
+	${CARGO_CRATE_URIS}
+"
+S="${WORKDIR}/${PN}-${MY_COMMIT}"
+
+LICENSE="Apache-2.0"
+# Dependent crate licenses
+LICENSE+="
+	Apache-2.0 BSD-2 BSD Boost-1.0 CC0-1.0 CDLA-Permissive-2.0 EPL-2.0
+	ISC MIT MIT-0 MPL-2.0 MPL-2.0 Unicode-3.0 Unicode-DFS-2016 WTFPL-2
+	ZLIB
+"
+SLOT="0"
+KEYWORDS="~amd64" # ~arm64: ugrep
+# TODO add feature USE flags?
+
+DEPEND="
+	sys-apps/bfs
+	sys-apps/ripgrep
+	sys-apps/ugrep
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	>=dev-libs/protobuf-25.6[protoc]
+"
+
+QA_FLAGS_IGNORED="usr/bin/.*"
+
+CHECKREQS_DISK_BUILD=10G # 9.7G
+
+pkg_setup() {
+	check-reqs_pkg_setup
+	rust_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	# Do not bundle ripgrep
+	local f
+	for f in crates/codegen/xai-grok-{shell,tools}/build.rs; do
+		sed \
+			-e '1i #![allow(unreachable_code)]' \
+			-e '/fn main()/a \    return Ok(());' \
+			-i "$f" || die
+	done
+
+	# Disable auto-updates
+	sed \
+		-e '1i #![allow(unreachable_code)]' \
+		-e '/fn env_installer(/a \    return Some("portage");' \
+		-i crates/codegen/xai-grok-update/src/auto_update.rs || die
+
+	# Cargo offline fetch workaround
+	local url commit path
+	IFS=";" read -r url commit path <<<"${GIT_CRATES[async-openai]}"
+	local ASYNC_OPENAI_GIT="async-openai = { git = \"${url}.git\", rev = \"${commit}\""
+	local ASYNC_OPENAI_PATH="async-openai = \\{ path = \"${WORKDIR}/async-openai-${commit}/async-openai\""
+
+	sed "s|${ASYNC_OPENAI_GIT}|${ASYNC_OPENAI_PATH}|" \
+		-i "${S}/Cargo.toml" || die
+}
+
+src_test() {
+	# TODO more tests
+	cargo_src_test --package xai-grok-pager-bin
+}
+
+src_install() {
+	newbin "$(cargo_target_dir)/xai-grok-pager" grok
+	dosym grok /usr/bin/agent
+
+	local grok_bin="${ED}/usr/bin/grok"
+	"${grok_bin}" completions bash > grok || die
+	"${grok_bin}" completions fish > grok.fish || die
+	"${grok_bin}" completions zsh > _grok || die
+
+	dobashcomp grok
+	dofishcomp grok.fish
+	dozshcomp _grok
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.