Skip to content

Commit 07434b6

Browse files
authored
new package: codex (#2032)
1 parent f2d89fe commit 07434b6

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

tur/codex/0001-fix-deps.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/codex-rs/core/Cargo.toml
2+
+++ b/codex-rs/core/Cargo.toml
3+
@@ -83,6 +83,8 @@
4+
uuid = { workspace = true, features = ["serde", "v4"] }
5+
which = { workspace = true }
6+
wildmatch = { workspace = true }
7+
+
8+
+[target.'cfg(target_os = "windows")'.dependencies]
9+
codex_windows_sandbox = { package = "codex-windows-sandbox", path = "../windows-sandbox-rs" }
10+
11+

tur/codex/build.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
TERMUX_PKG_HOMEPAGE=https://github.com/openai/codex
2+
TERMUX_PKG_DESCRIPTION="Lightweight coding agent that runs in your terminal"
3+
TERMUX_PKG_LICENSE="Apache-2.0, MIT"
4+
TERMUX_PKG_LICENSE_FILE="../LICENSE, ../NOTICE"
5+
TERMUX_PKG_MAINTAINER="@termux-user-repository"
6+
TERMUX_PKG_VERSION="0.53.0"
7+
TERMUX_PKG_SRCURL="https://github.com/openai/codex/archive/refs/tags/rust-v$TERMUX_PKG_VERSION.tar.gz"
8+
TERMUX_PKG_SHA256=e4330829c37b294105487a77fa3b22e66df2e59bd427e44dc57c969170d58425
9+
TERMUX_PKG_DEPENDS="libc++, openssl"
10+
TERMUX_PKG_AUTO_UPDATE=true
11+
TERMUX_PKG_UPDATE_VERSION_SED_REGEXP='s/rust-v//'
12+
TERMUX_PKG_BUILD_IN_SRC=true
13+
14+
termux_step_configure() {
15+
TERMUX_PKG_SRCDIR+="/codex-rs"
16+
TERMUX_PKG_BUILDDIR+="/codex-rs"
17+
}
18+
19+
termux_step_make() {
20+
termux_setup_rust
21+
22+
cargo build \
23+
-p codex-cli \
24+
--release \
25+
--jobs $TERMUX_PKG_MAKE_PROCESSES \
26+
--target $CARGO_TARGET_NAME
27+
}
28+
29+
termux_step_make_install() {
30+
install -Dm700 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/codex
31+
32+
install -Dm600 -t $TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME ../docs/*
33+
}

0 commit comments

Comments
 (0)