repo/proj/guru:dev commit in: dev-util/grok-build/
"Florian Albrechtskirchinger" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786279692.a2c9313304a67b4845fe9c7a07b4ebf089b5e643.falbrechtskirchinger@gentoo> |
commit: a2c9313304a67b4845fe9c7a07b4ebf089b5e643
Author: Florian Albrechtskirchinger <falbrechtskirchinger <AT> gmail <DOT> com>
AuthorDate: Sat Aug 8 15:49:09 2026 +0000
Commit: Florian Albrechtskirchinger <falbrechtskirchinger <AT> gmail <DOT> com>
CommitDate: Sun Aug 9 12:48:12 2026 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a2c93133
dev-util/grok-build: add 1.0.0
Signed-off-by: Florian Albrechtskirchinger <falbrechtskirchinger <AT> gmail.com>
dev-util/grok-build/Manifest | 2 +
dev-util/grok-build/grok-build-1.0.0.ebuild | 112 ++++++++++++++++++++++++++++
2 files changed, 114 insertions(+)
diff --git a/dev-util/grok-build/Manifest b/dev-util/grok-build/Manifest
index 32e20812e6..e7ea44b4dd 100644
--- a/dev-util/grok-build/Manifest
+++ b/dev-util/grok-build/Manifest
@@ -3,4 +3,6 @@ DIST grok-build-0.2.109-crates.tar.xz 91699100 BLAKE2B 24d8caec52c512560e94e4c9f
DIST grok-build-0.2.109.gh.tar.gz 12635136 BLAKE2B db1e19c476a2e7efc501ad87e4369c74f59569db2149242a10f7d0e1e2b6c22fb39b6247b9dc02c99a57adc3915df4d7416a70b5b121903e30903c30bcc8982e SHA512 052b06a79dd3321a72716fb2bb5f9c4287720b03e2254dd202a545897f8cfd9287d15dec2d0ca3a3298fa16ccbeb4b17f02a2469693071c18bd5421aa13dd03a
DIST grok-build-0.2.111-crates.tar.xz 90346368 BLAKE2B 2f6bc0c15318cf4783fb6d1e72db9772418d70e929fca173f8e42aeb531db43b809c73e2c94148e91f289c736cca1f92c89776006a1d0f21b2fa85f0bb48918c SHA512 3f910aa80c7faed3a229b66210c28f3d8aa59b8b577e216e21149574f37b88caffc7bfa684e66ef8927c230f55f67e34a131d8877531571cd5211f50bbb08932
DIST grok-build-0.2.111.gh.tar.gz 12900201 BLAKE2B e84292eb188c07aeb3302472baed204a4774a14fa8e8144a210705052682ffeba5711a38c612d1925606ff340b5c7c2d0bdc428e68395f364be404746f2afdc2 SHA512 c31567ea8aa54ea3d08a254571d7e314454903b227fdff362ee4eeced3e8b87a3f26957541fc6640ca879f8cb50e17f4926092d9d7fc1a23bdbb73ce13975479
+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 nucleo-5b74652e482f7c07d827f18c6d21e7540c242c69.gh.tar.gz 86764 BLAKE2B 006ac7e8c4c7e35a9fd690cd699c7c6d45f9368ed5ac8e1ad2b098128b530ef1f72aeccc6e87dd7d84f98b402f72313be8716f1eeae954b25898359f1037b41a SHA512 a8762638ef79da9dc344664342779c9aecb1b19facc23614d87b639d21b356aab3715cbdb51e541b7dd569a2d4e5cbf97591d4341e3ae538e5aa4a620f4f72f6
diff --git a/dev-util/grok-build/grok-build-1.0.0.ebuild b/dev-util/grok-build/grok-build-1.0.0.ebuild
new file mode 100644
index 0000000000..c17d842748
--- /dev/null
+++ b/dev-util/grok-build/grok-build-1.0.0.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="e6ab3909d28ffa5936eaffe519f691fd6854b028"
+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
+}