Package Details: ai-jail 1.4.0-1

Git Clone URL: https://aur.archlinux.org/ai-jail.git (read-only, click to copy)
Package Base: ai-jail
Description: Sandbox wrapper for AI coding agents
Upstream URL: https://github.com/akitaonrails/ai-jail
Licenses: GPL-3.0-only
Conflicts: ai-jail-bin
Submitter: ptroncone
Maintainer: akitaonrails
Last Packager: akitaonrails
Votes: 1
Popularity: 0.75
First Submitted: 2026-04-17 17:11 (UTC)
Last Updated: 2026-05-26 16:18 (UTC)

Dependencies (6)

Required by (0)

Sources (1)

Latest Comments

BertiBoeller commented on 2026-07-02 19:17 (UTC)

PKGBUILD for 1.10.3

# Maintainer: Pasqual Troncone <pasqualtroncone at gmail dot com>
# Co-Maintainer: AkitaOnRails <boss@akitaonrails.com>

pkgname=ai-jail
pkgver=1.10.3
pkgrel=2
pkgdesc="Sandbox wrapper for AI coding agents"
arch=('x86_64' 'aarch64')
url="https://github.com/akitaonrails/ai-jail"
license=('GPL-3.0-only')
depends=('bubblewrap' 'glibc' 'gcc-libs')
makedepends=('cargo' 'git')
optdepends=(
    'mise: language version management inside the sandbox'
    'docker: Docker socket passthrough for sandboxed agents'
)
# Cargo's release profile strips symbols, so the auto-generated -debug split
# would be empty and would collide with ai-jail-bin-debug if both package
# variants were ever installed on the same machine.
options=('!debug')
conflicts=('ai-jail-bin')
source=("$pkgname::git+$url.git#tag=v$pkgver")
sha256sums=('SKIP')

prepare() {
    cd "$pkgname"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_HOME="$srcdir/cargo-home"
    mkdir -p "$CARGO_HOME"
    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
    cd "$pkgname"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_HOME="$srcdir/cargo-home"
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release
}

check() {
    cd "$pkgname"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_HOME="$srcdir/cargo-home"
    export HOME="$srcdir/test-home"
    mkdir -p "$HOME"
    # Keep AUR builds robust across user kernels/containers: run the unit test
    # binary, not the sandbox-escape integration tests that require working
    # unprivileged namespaces at package-build time.
    cargo test --frozen --release --bin ai-jail
}

package() {
    cd "$pkgname"
    install -Dm0755 -t "$pkgdir/usr/bin/"                    "target/release/ai-jail"
    install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/"     "README.md"
    install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}