53 lines
1.4 KiB
Bash
53 lines
1.4 KiB
Bash
# Maintainer: Christopher Cooper <christopher@cg505.com>
|
|
pkgname=openai-codex
|
|
pkgver=0.50.0
|
|
pkgrel=1
|
|
pkgdesc="Lightweight coding agent that runs in your terminal"
|
|
arch=('x86_64' 'aarch64')
|
|
url="https://github.com/openai/codex"
|
|
license=('Apache-2.0')
|
|
depends=(
|
|
'openssl'
|
|
'gcc-libs'
|
|
'glibc'
|
|
)
|
|
makedepends=(
|
|
'cargo'
|
|
)
|
|
optdepends=(
|
|
'git'
|
|
'ripgrep: accelerated large-repo search'
|
|
)
|
|
# LTO seems to cause build failures, details unclear
|
|
options=('!lto')
|
|
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/rust-v${pkgver}.tar.gz")
|
|
b2sums=('fe729cf385b9584ba64cd65656abd60e172a2679e801ca9a6ebd017f38d0037c61479b14c0222f97302038af6302430f4073ec2e7854a0aabcd28192e560ccce')
|
|
|
|
prepare() {
|
|
cd "codex-rust-v${pkgver}/codex-rs"
|
|
|
|
export RUSTUP_TOOLCHAIN=stable
|
|
|
|
# Cargo.lock seems to be outdated, do not use --locked.
|
|
cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
|
|
}
|
|
|
|
build() {
|
|
cd "codex-rust-v${pkgver}/codex-rs"
|
|
|
|
export RUSTUP_TOOLCHAIN=stable
|
|
export CARGO_TARGET_DIR=target
|
|
|
|
cargo build --release --frozen
|
|
}
|
|
|
|
# check() omitted - there seems to be some irrelevant test failures
|
|
|
|
package() {
|
|
cd "codex-rust-v${pkgver}/codex-rs"
|
|
|
|
install -Dm755 -t "${pkgdir}/usr/bin" "target/release/codex"
|
|
install -Dm755 -t "${pkgdir}/usr/bin" "target/release/codex-exec"
|
|
install -Dm755 -t "${pkgdir}/usr/bin" "target/release/codex-linux-sandbox"
|
|
}
|