diff --git a/dev-util/grok-build/Manifest b/dev-util/grok-build/Manifest new file mode 100644 index 0000000000..b4a12f34a9 --- /dev/null +++ b/dev-util/grok-build/Manifest @@ -0,0 +1,3 @@ +DIST grok-build-0.2.102-crates.tar.xz 91492196 BLAKE2B dc49e77c2fb65ff1488c47472af5c0039d464a5a7c8c49988dbcc5957a7bade5577bb8c4a1075ecb09775d3bae93c20d38fa62697c2ef720c036909800c6247f SHA512 010d3789296a8294b6fc19443b1b79ba17db146b23f135edb04c621e331beb571c5df2e96b76f3aa775c8adc0c72ecef3dc9c21e2ceade2bace5701ab099002c +DIST grok-build-0.2.102.gh.tar.gz 12247596 BLAKE2B 451de50d32ba386a21bb873909e8f3af74f50e7b18ed68f012d4562ca809d6c1c0a59cc6c00d1153a14e91c7daac68b6761c5c3b37dc5a83f1ba0fdc9168851e SHA512 32009bd286cd05ed543cac3d3b953b7ce8b065e893f0553e8975410b77266c9b331634da4e9c22b0c695e39d97c6a93f781c423e1fa88f6830fc086d9d54040e +DIST nucleo-5b74652e482f7c07d827f18c6d21e7540c242c69.gh.tar.gz 86764 BLAKE2B 006ac7e8c4c7e35a9fd690cd699c7c6d45f9368ed5ac8e1ad2b098128b530ef1f72aeccc6e87dd7d84f98b402f72313be8716f1eeae954b25898359f1037b41a SHA512 a8762638ef79da9dc344664342779c9aecb1b19facc23614d87b639d21b356aab3715cbdb51e541b7dd569a2d4e5cbf97591d4341e3ae538e5aa4a620f4f72f6 diff --git a/dev-util/grok-build/grok-build-0.2.102.ebuild b/dev-util/grok-build/grok-build-0.2.102.ebuild new file mode 100644 index 0000000000..5d8b29d7ae --- /dev/null +++ b/dev-util/grok-build/grok-build-0.2.102.ebuild @@ -0,0 +1,97 @@ +# 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=( + [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="357ebb259bc27d8ae9127f0b5c3db85287d2aa19" +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 Unicode-3.0 Unicode-DFS-2016 WTFPL-2 ZLIB +" +SLOT="0" +KEYWORDS="~amd64" # ~arm64: ugrep +# TODO add feature USE flags? +IUSE="test" + +RESTRICT="!test? ( test )" + +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 +} + +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 +} diff --git a/dev-util/grok-build/metadata.xml b/dev-util/grok-build/metadata.xml new file mode 100644 index 0000000000..e993b1b278 --- /dev/null +++ b/dev-util/grok-build/metadata.xml @@ -0,0 +1,12 @@ + + + + + falbrechtskirchinger@gmail.com + Florian Albrechtskirchinger + + + xai-org/grok-build + https://x.ai/build/changelog + +