mirror of
https://github.com/openai/codex.git
synced 2026-02-01 22:47:52 +00:00
## Summary - Add rust-overlay input to provide newer Rust versions (rama crates require rustc 1.91.0+) - Add devShells output with complete development environment - Add missing git dependency hashes to codex-rs/default.nix ## Changes **flake.nix:** - Added `rust-overlay` input to get newer Rust toolchains - Updated `packages` output to use `rust-bin.stable.latest.minimal` for builds - Added `devShells` output with: - Rust with `rust-src` and `rust-analyzer` extensions for IDE support - Required build dependencies: `pkg-config`, `openssl`, `cmake`, `libclang` - Environment variables: `PKG_CONFIG_PATH`, `LIBCLANG_PATH` **codex-rs/default.nix:** - Added missing `outputHashes` for git dependencies: - `nucleo-0.5.0`, `nucleo-matcher-0.3.1` - `runfiles-0.1.0` - `tokio-tungstenite-0.28.0`, `tungstenite-0.28.0` ## Test Plan - [x] `nix develop` enters shell successfully - [x] `nix develop -c rustc --version` shows 1.93.0 - [x] `nix develop -c cargo build` completes successfully
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{
|
||
openssl,
|
||
rustPlatform,
|
||
pkg-config,
|
||
lib,
|
||
...
|
||
}:
|
||
rustPlatform.buildRustPackage (_: {
|
||
env = {
|
||
PKG_CONFIG_PATH = "${openssl.dev}/lib/pkgconfig:$PKG_CONFIG_PATH";
|
||
};
|
||
pname = "codex-rs";
|
||
version = "0.1.0";
|
||
cargoLock.lockFile = ./Cargo.lock;
|
||
doCheck = false;
|
||
src = ./.;
|
||
nativeBuildInputs = [
|
||
pkg-config
|
||
openssl
|
||
];
|
||
|
||
cargoLock.outputHashes = {
|
||
"ratatui-0.29.0" = "sha256-HBvT5c8GsiCxMffNjJGLmHnvG77A6cqEL+1ARurBXho=";
|
||
"crossterm-0.28.1" = "sha256-6qCtfSMuXACKFb9ATID39XyFDIEMFDmbx6SSmNe+728=";
|
||
"nucleo-0.5.0" = "sha256-Hm4SxtTSBrcWpXrtSqeO0TACbUxq3gizg1zD/6Yw/sI=";
|
||
"nucleo-matcher-0.3.1" = "sha256-Hm4SxtTSBrcWpXrtSqeO0TACbUxq3gizg1zD/6Yw/sI=";
|
||
"runfiles-0.1.0" = "sha256-uJpVLcQh8wWZA3GPv9D8Nt43EOirajfDJ7eq/FB+tek=";
|
||
"tokio-tungstenite-0.28.0" = "sha256-vJZ3S41gHtRt4UAODsjAoSCaTksgzCALiBmbWgyDCi8=";
|
||
"tungstenite-0.28.0" = "sha256-CyXZp58zGlUhEor7WItjQoS499IoSP55uWqr++ia+0A=";
|
||
};
|
||
|
||
meta = with lib; {
|
||
description = "OpenAI Codex command‑line interface rust implementation";
|
||
license = licenses.asl20;
|
||
homepage = "https://github.com/openai/codex";
|
||
};
|
||
})
|