diff --git a/gnu/local.mk b/gnu/local.mk index b9acddf9c6..b37d5616d0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2319,6 +2319,10 @@ dist_patch_DATA = \ %D%/packages/patches/rust-1.70-fix-rustix-build.patch \ %D%/packages/patches/rust-1.78-unwinding-fix.patch \ %D%/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch \ + %D%/packages/patches/rust-codex-0.98.0-arg0-file-lock.patch \ + %D%/packages/patches/rust-codex-0.98.0-core-file-lock.patch \ + %D%/packages/patches/rust-codex-0.98.0-core-remove-self-dep.patch \ + %D%/packages/patches/rust-codex-0.98.0-execpolicy-file-lock.patch \ %D%/packages/patches/rust-ring-0.17-ring-core.patch \ %D%/packages/patches/rw-igraph-0.10.patch \ %D%/packages/patches/rxvt-unicode-fix-cursor-position.patch \ diff --git a/gnu/packages/patches/rust-codex-0.98.0-arg0-file-lock.patch b/gnu/packages/patches/rust-codex-0.98.0-arg0-file-lock.patch new file mode 100644 index 0000000000..62298d9572 --- /dev/null +++ b/gnu/packages/patches/rust-codex-0.98.0-arg0-file-lock.patch @@ -0,0 +1,89 @@ +Author: Danny Milosavljevic +Date: 2026-02-07 +License: ASL2.0 +Subject: Use libc::flock instead of unstable std File::try_lock(). + +The file_lock feature is tracked at +and is not yet stable in old Rust versions like Rust 1.88. + +diff -ruN a/codex-rs/arg0/Cargo.toml b/codex-rs/arg0/Cargo.toml +--- a/codex-rs/arg0/Cargo.toml ++++ b/codex-rs/arg0/Cargo.toml +@@ -17,5 +17,6 @@ + codex-core = { workspace = true } + codex-linux-sandbox = { workspace = true } + dotenvy = { workspace = true } ++libc = { workspace = true } + tempfile = { workspace = true } + tokio = { workspace = true, features = ["rt-multi-thread"] } +diff -ruN a/codex-rs/arg0/src/lib.rs b/codex-rs/arg0/src/lib.rs +--- a/codex-rs/arg0/src/lib.rs ++++ b/codex-rs/arg0/src/lib.rs +@@ -5,6 +5,8 @@ + + use codex_core::CODEX_APPLY_PATCH_ARG1; + #[cfg(unix)] ++use std::os::unix::io::AsRawFd; ++#[cfg(unix)] + use std::os::unix::fs::symlink; + use tempfile::TempDir; + +@@ -13,6 +15,18 @@ + const MISSPELLED_APPLY_PATCH_ARG0: &str = "applypatch"; + const LOCK_FILENAME: &str = ".lock"; + ++// FIXME: Remove this helper when Rust provides stable file locking API. ++// The file_lock feature is tracked at . ++#[cfg(unix)] ++fn try_lock_exclusive(file: &File) -> std::io::Result<()> { ++ let ret = unsafe { libc::flock(file.as_raw_fd(), libc::LOCK_EX | libc::LOCK_NB) }; ++ if ret == 0 { ++ Ok(()) ++ } else { ++ Err(std::io::Error::last_os_error()) ++ } ++} ++ + /// Keeps the per-session PATH entry alive and locked for the process lifetime. + pub struct Arg0PathEntryGuard { + _temp_dir: TempDir, +@@ -216,7 +230,7 @@ + .create(true) + .truncate(false) + .open(&lock_path)?; +- lock_file.try_lock()?; ++ try_lock_exclusive(&lock_file)?; + + for filename in &[ + APPLY_PATCH_ARG0, +@@ -307,10 +321,10 @@ + Err(err) => return Err(err), + }; + +- match lock_file.try_lock() { ++ match try_lock_exclusive(&lock_file) { + Ok(()) => Ok(Some(lock_file)), +- Err(std::fs::TryLockError::WouldBlock) => Ok(None), +- Err(err) => Err(err.into()), ++ Err(ref e) if e.raw_os_error() == Some(libc::EWOULDBLOCK) => Ok(None), ++ Err(err) => Err(err), + } + } + +@@ -318,6 +332,7 @@ + mod tests { + use super::LOCK_FILENAME; + use super::janitor_cleanup; ++ use super::try_lock_exclusive; + use std::fs; + use std::fs::File; + use std::path::Path; +@@ -350,7 +365,7 @@ + let dir = root.path().join("locked"); + fs::create_dir(&dir)?; + let lock_file = create_lock(&dir)?; +- lock_file.try_lock()?; ++ try_lock_exclusive(&lock_file)?; + + janitor_cleanup(root.path())?; + diff --git a/gnu/packages/patches/rust-codex-0.98.0-core-file-lock.patch b/gnu/packages/patches/rust-codex-0.98.0-core-file-lock.patch new file mode 100644 index 0000000000..ee53f7e277 --- /dev/null +++ b/gnu/packages/patches/rust-codex-0.98.0-core-file-lock.patch @@ -0,0 +1,91 @@ +Author: Danny Milosavljevic +Date: 2026-01-25 +License: ASL2.0 +Subject: Use libc::flock instead of unstable std File::try_lock()/try_lock_shared(). + +The file_lock feature is tracked at . +and is not yet stable in old Rust versions like Rust 1.85. + +The file_lock feature was stabilized after Rust 1.88, but we only have 1.88. + +diff -u a/codex-rs/core/src/message_history.rs b/codex-rs/core/src/message_history.rs +--- a/codex-rs/core/src/message_history.rs ++++ b/codex-rs/core/src/message_history.rs +@@ -41,6 +41,8 @@ + use std::os::unix::fs::OpenOptionsExt; + #[cfg(unix)] + use std::os::unix::fs::PermissionsExt; ++#[cfg(unix)] ++use std::os::unix::io::AsRawFd; + + /// Filename that stores the message history inside `~/.codex`. + const HISTORY_FILENAME: &str = "history.jsonl"; +@@ -51,6 +53,28 @@ + const MAX_RETRIES: usize = 10; + const RETRY_SLEEP: Duration = Duration::from_millis(100); + ++// FIXME: Remove these helpers when Rust provides stable file locking API ++// The file_lock feature is tracked at . ++#[cfg(unix)] ++fn try_lock_exclusive(file: &File) -> std::io::Result<()> { ++ let ret = unsafe { libc::flock(file.as_raw_fd(), libc::LOCK_EX | libc::LOCK_NB) }; ++ if ret == 0 { ++ Ok(()) ++ } else { ++ Err(std::io::Error::last_os_error()) ++ } ++} ++ ++#[cfg(unix)] ++fn try_lock_shared(file: &File) -> std::io::Result<()> { ++ let ret = unsafe { libc::flock(file.as_raw_fd(), libc::LOCK_SH | libc::LOCK_NB) }; ++ if ret == 0 { ++ Ok(()) ++ } else { ++ Err(std::io::Error::last_os_error()) ++ } ++} ++ + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] + pub struct HistoryEntry { + pub session_id: String, +@@ -126,7 +150,7 @@ + tokio::task::spawn_blocking(move || -> Result<()> { + // Retry a few times to avoid indefinite blocking when contended. + for _ in 0..MAX_RETRIES { +- match history_file.try_lock() { ++ match try_lock_exclusive(&history_file) { + Ok(()) => { + // While holding the exclusive lock, write the full line. + // We do not open the file with `append(true)` on Windows, so ensure the +@@ -137,10 +161,10 @@ + enforce_history_limit(&mut history_file, history_max_bytes)?; + return Ok(()); + } +- Err(std::fs::TryLockError::WouldBlock) => { ++ Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => { + std::thread::sleep(RETRY_SLEEP); + } +- Err(e) => return Err(e.into()), ++ Err(e) => return Err(e), + } + } + +@@ -341,7 +365,7 @@ + // Open & lock file for reading using a shared lock. + // Retry a few times to avoid indefinite blocking. + for _ in 0..MAX_RETRIES { +- let lock_result = file.try_lock_shared(); ++ let lock_result = try_lock_shared(&file); + + match lock_result { + Ok(()) => { +@@ -368,7 +392,7 @@ + // Not found at requested offset. + return None; + } +- Err(std::fs::TryLockError::WouldBlock) => { ++ Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => { + std::thread::sleep(RETRY_SLEEP); + } + Err(e) => { diff --git a/gnu/packages/patches/rust-codex-0.98.0-core-remove-self-dep.patch b/gnu/packages/patches/rust-codex-0.98.0-core-remove-self-dep.patch new file mode 100644 index 0000000000..a92f9de4d9 --- /dev/null +++ b/gnu/packages/patches/rust-codex-0.98.0-core-remove-self-dep.patch @@ -0,0 +1,24 @@ +Author: Danny Milosavljevic +Date: 2026-02-08 +License: ASL2.0 +Subject: Remove codex-core circular dev-dependencies. + +codex-core has a dev-dependency on itself with different features enabled, +and a dev-dependency on codex-arg0 which in turn depends on codex-core. +Both cause cargo package to fail when resolving from the vendor directory +because neither is available at the time codex-core is packaged. + +diff -u a/codex-rs/core/Cargo.toml b/codex-rs/core/Cargo.toml +--- a/codex-rs/core/Cargo.toml ++++ b/codex-rs/core/Cargo.toml +@@ -140,10 +140,7 @@ + assert_cmd = { workspace = true } + assert_matches = { workspace = true } +-codex-arg0 = { workspace = true } +-codex-core = { path = ".", default-features = false, features = [ +- "deterministic_process_ids", +-] } ++# codex-arg0 and codex-core self-ref removed for packaging + codex-otel = { workspace = true, features = [ + "disable-default-metrics-exporter", + ] } diff --git a/gnu/packages/patches/rust-codex-0.98.0-execpolicy-file-lock.patch b/gnu/packages/patches/rust-codex-0.98.0-execpolicy-file-lock.patch new file mode 100644 index 0000000000..10b8b37c5c --- /dev/null +++ b/gnu/packages/patches/rust-codex-0.98.0-execpolicy-file-lock.patch @@ -0,0 +1,49 @@ +Author: Danny Milosavljevic +Date: 2026-01-25 +License: ASL2.0 +Subject: Use libc::flock instead of unstable std File::lock(). + +The file_lock feature is tracked at . +and is not yet stable in old Rust versions like Rust 1.85. + +The file_lock feature was stabilized after Rust 1.88, but we only have 1.88. + +diff -u a/codex-rs/execpolicy/Cargo.toml b/codex-rs/execpolicy/Cargo.toml +--- a/codex-rs/execpolicy/Cargo.toml ++++ b/codex-rs/execpolicy/Cargo.toml +@@ -19,6 +19,7 @@ + [dependencies] + anyhow = { workspace = true } + clap = { workspace = true, features = ["derive"] } ++libc = { workspace = true } + multimap = { workspace = true } + serde = { workspace = true, features = ["derive"] } + serde_json = { workspace = true } +diff -u a/codex-rs/execpolicy/src/amend.rs b/codex-rs/execpolicy/src/amend.rs +--- a/codex-rs/execpolicy/src/amend.rs ++++ b/codex-rs/execpolicy/src/amend.rs +@@ -1,4 +1,5 @@ + use std::fs::OpenOptions; ++use std::os::unix::io::AsRawFd; + use std::io::Read; + use std::io::Seek; + use std::io::SeekFrom; +@@ -100,10 +101,14 @@ + path: policy_path.to_path_buf(), + source, + })?; +- file.lock().map_err(|source| AmendError::LockPolicyFile { +- path: policy_path.to_path_buf(), +- source, +- })?; ++ // FIXME: Use file.lock() when Rust 1.91 is available ++ let ret = unsafe { libc::flock(file.as_raw_fd(), libc::LOCK_EX) }; ++ if ret != 0 { ++ return Err(AmendError::LockPolicyFile { ++ path: policy_path.to_path_buf(), ++ source: std::io::Error::last_os_error(), ++ }); ++ } + + let len = file + .metadata() diff --git a/gnu/packages/rust-crates.scm b/gnu/packages/rust-crates.scm index 9961cb2f38..7a48bf0409 100644 --- a/gnu/packages/rust-crates.scm +++ b/gnu/packages/rust-crates.scm @@ -3447,6 +3447,99 @@ (crate-source "codex" "0.2.0" "0g22dvnqq4nkdx1bn91x0nr072qmak34b5l98yivxb2wzkpy32cm")) +(define rust-codex-api-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-app-server-protocol-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-apply-patch-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-arg0-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-async-utils-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-client-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-common-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-core-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-execpolicy-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-experimental-api-macros-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-file-search-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-git-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-keyring-store-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-linux-sandbox-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-lmstudio-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-login-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-mcp-server-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-ollama-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-otel-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-protocol-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-rmcp-client-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-state-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-utils-absolute-path-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-utils-cache-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-utils-home-dir-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-utils-image-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-utils-json-to-toml-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-utils-pty-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-utils-readiness-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-utils-string-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + +(define rust-codex-windows-sandbox-0.0.0.785c0c43 + package:rust-codex-0.0.0.785c0c43) + (define rust-codspeed-2.10.0 (crate-source "codspeed" "2.10.0" "1x9anwlfzlfby794d5fcvp214bj8bp29br8pkksxwb7834djja6j")) @@ -18384,11 +18477,6 @@ (crate-source "seq_io" "0.3.4" "1pkasxcf25p1cf2w99a4flhjjaicg4rs14w5g8fkrs0fafg5a0qk")) -(define rust-sequoia-autocrypt-0.25.1 - (crate-source "sequoia-autocrypt" "0.25.1" - "0ns121ggmx690m8czhc7zbb7rwz0jjv3l5gw4igs6mn1hznc0kz2" - #:snippet '(delete-file-recursively "tests"))) - (define rust-sequoia-autocrypt-0.26.0 (crate-source "sequoia-autocrypt" "0.26.0" "12wjwv5bsbwjqf25zdkfilnlmgw3jj8y3j1nbm83x6jqr3qmzmhi" @@ -31313,6 +31401,729 @@ rust-zerovec-0.11.5 rust-zerovec-derive-0.11.2 rust-zmij-1.0.12)) + (rust-codex-0.0.0.785c0c43 => + (list rust-inflector-0.11.4 + rust-adler2-2.0.1 + rust-aes-0.8.4 + rust-ahash-0.8.12 + rust-aho-corasick-1.1.4 + rust-allocative-0.3.4 + rust-allocative-derive-0.3.3 + rust-allocator-api2-0.2.21 + rust-android-system-properties-0.1.5 + rust-annotate-snippets-0.9.2 + rust-anstream-0.6.21 + rust-anstyle-1.0.13 + rust-anstyle-parse-0.2.7 + rust-anstyle-query-1.1.5 + rust-anstyle-wincon-3.0.11 + rust-anyhow-1.0.100 + rust-arbitrary-1.4.2 + rust-arc-swap-1.8.0 + rust-ascii-1.1.0 + rust-ascii-canvas-3.0.0 + rust-assert-json-diff-2.0.2 + rust-assert-cmd-2.1.2 + rust-assert-matches-1.5.0 + rust-async-broadcast-0.7.2 + rust-async-channel-2.5.0 + rust-async-executor-1.13.3 + rust-async-fs-2.2.0 + rust-async-io-2.6.0 + rust-async-lock-3.4.2 + rust-async-process-2.5.0 + rust-async-recursion-1.1.1 + rust-async-signal-0.2.13 + rust-async-stream-0.3.6 + rust-async-stream-impl-0.3.6 + rust-async-task-4.7.1 + rust-async-trait-0.1.89 + rust-atoi-2.0.0 + rust-atomic-waker-1.1.2 + rust-autocfg-1.5.0 + rust-axum-0.8.8 + rust-axum-core-0.5.6 + rust-base64-0.22.1 + rust-base64ct-1.8.3 + rust-beef-0.5.2 + rust-bit-set-0.5.3 + rust-bit-vec-0.6.3 + rust-bitflags-1.3.2 + rust-bitflags-2.10.0 + rust-block-buffer-0.10.4 + rust-block-padding-0.3.3 + rust-block2-0.6.2 + rust-blocking-1.6.2 + rust-bstr-1.12.1 + rust-bumpalo-3.19.1 + rust-bytemuck-1.25.0 + rust-byteorder-1.5.0 + rust-byteorder-lite-0.1.0 + rust-bytes-1.11.1 + rust-bzip2-0.5.2 + rust-bzip2-sys-0.1.13+1.0.8 + rust-cbc-0.1.2 + rust-cc-1.2.55 + rust-cesu8-1.1.0 + rust-cfg-if-1.0.4 + rust-cfg-aliases-0.1.1 + rust-cfg-aliases-0.2.1 + rust-chardetng-0.1.17 + rust-chrono-0.4.43 + rust-chunked-transfer-1.5.0 + rust-cipher-0.4.4 + rust-clap-4.5.56 + rust-clap-builder-4.5.56 + rust-clap-derive-4.5.55 + rust-clap-lex-0.7.7 + rust-clipboard-win-5.4.1 + rust-cmp-any-0.8.1 + rust-colorchoice-1.0.4 + rust-combine-4.6.7 + rust-concurrent-queue-2.5.0 + rust-const-hex-1.17.0 + rust-const-oid-0.9.6 + rust-constant-time-eq-0.3.1 + rust-convert-case-0.6.0 + rust-core-foundation-0.10.1 + rust-core-foundation-0.9.4 + rust-core-foundation-sys-0.8.7 + rust-cpufeatures-0.2.17 + rust-crc-3.4.0 + rust-crc-catalog-2.4.0 + rust-crc32fast-1.5.0 + rust-critical-section-1.2.0 + rust-crossbeam-channel-0.5.15 + rust-crossbeam-deque-0.8.6 + rust-crossbeam-epoch-0.9.18 + rust-crossbeam-queue-0.3.12 + rust-crossbeam-utils-0.8.21 + rust-crunchy-0.2.4 + rust-crypto-common-0.1.7 + rust-ctor-0.1.26 + rust-ctor-0.6.3 + rust-ctor-proc-macro-0.0.7 + rust-dtor-0.1.1 + rust-dtor-proc-macro-0.0.6 + rust-darling-0.21.3 + rust-darling-0.23.0 + rust-darling-core-0.21.3 + rust-darling-core-0.23.0 + rust-darling-macro-0.21.3 + rust-darling-macro-0.23.0 + rust-data-encoding-2.10.0 + rust-dbus-0.9.10 + rust-dbus-secret-service-4.1.0 + rust-deadpool-0.12.3 + rust-deadpool-runtime-0.1.4 + rust-deflate64-0.1.10 + rust-debugserver-types-0.5.0 + rust-der-0.7.10 + rust-deranged-0.5.5 + rust-derivative-2.2.0 + rust-derive-arbitrary-1.4.2 + rust-derive-more-1.0.0 + rust-derive-more-impl-1.0.0 + rust-diff-0.1.13 + rust-difflib-0.4.0 + rust-digest-0.10.7 + rust-dirs-6.0.0 + rust-dirs-next-2.0.0 + rust-dirs-sys-0.5.0 + rust-dirs-sys-next-0.1.2 + rust-dispatch2-0.3.0 + rust-display-container-0.9.0 + rust-displaydoc-0.2.5 + rust-dotenvy-0.15.7 + rust-downcast-rs-1.2.1 + rust-dunce-1.0.5 + rust-dupe-0.9.1 + rust-dupe-derive-0.9.1 + rust-dyn-clone-1.0.20 + rust-either-1.15.0 + rust-ena-0.14.3 + rust-encoding-rs-0.8.35 + rust-endi-1.1.1 + rust-endian-type-0.1.2 + rust-enumflags2-0.7.12 + rust-enumflags2-derive-0.7.12 + rust-env-flags-0.1.1 + rust-env-filter-0.1.4 + rust-env-home-0.1.0 + rust-env-logger-0.11.8 + rust-etcetera-0.8.0 + rust-equivalent-1.0.2 + rust-erased-serde-0.3.31 + rust-errno-0.3.14 + rust-error-code-3.3.2 + rust-event-listener-5.4.1 + rust-event-listener-strategy-0.5.4 + rust-eventsource-stream-0.2.3 + rust-fastrand-2.3.0 + rust-fax-0.2.6 + rust-fax-derive-0.2.0 + rust-fd-lock-4.0.4 + rust-fdeflate-0.3.7 + rust-filedescriptor-0.8.3 + rust-find-msvc-tools-0.1.9 + rust-fixed-decimal-0.7.1 + rust-fixedbitset-0.4.2 + rust-flate2-1.1.8 + rust-float-cmp-0.10.0 + rust-flume-0.11.1 + rust-fnv-1.0.7 + rust-foldhash-0.1.5 + rust-foldhash-0.2.0 + rust-foreign-types-0.3.2 + rust-foreign-types-shared-0.1.1 + rust-form-urlencoded-1.2.2 + rust-fsevent-sys-4.1.0 + rust-futures-0.3.31 + rust-futures-channel-0.3.31 + rust-futures-core-0.3.31 + rust-futures-executor-0.3.31 + rust-futures-io-0.3.31 + rust-futures-intrusive-0.5.0 + rust-futures-lite-2.6.1 + rust-futures-macro-0.3.31 + rust-futures-sink-0.3.31 + rust-futures-task-0.3.31 + rust-futures-util-0.3.31 + rust-fxhash-0.2.1 + rust-generic-array-0.14.7 + rust-getrandom-0.2.17 + rust-getrandom-0.3.4 + rust-globset-0.4.18 + rust-h2-0.4.13 + rust-half-2.7.1 + rust-hashbrown-0.12.3 + rust-hashbrown-0.14.5 + rust-hashbrown-0.15.5 + rust-hashbrown-0.16.1 + rust-hashlink-0.10.0 + rust-heck-0.5.0 + rust-hermit-abi-0.5.2 + rust-hex-0.4.3 + rust-hkdf-0.12.4 + rust-hmac-0.12.1 + rust-home-0.5.12 + rust-http-1.4.0 + rust-http-body-1.0.1 + rust-http-body-util-0.1.3 + rust-httparse-1.10.1 + rust-httpdate-1.0.3 + rust-hyper-1.8.1 + rust-hyper-rustls-0.27.7 + rust-hyper-timeout-0.5.2 + rust-hyper-tls-0.6.0 + rust-hyper-util-0.1.19 + rust-iana-time-zone-0.1.65 + rust-iana-time-zone-haiku-0.1.2 + rust-icu-collections-2.1.1 + rust-icu-decimal-2.1.1 + rust-icu-decimal-data-2.1.1 + rust-icu-locale-2.1.1 + rust-icu-locale-core-2.1.1 + rust-icu-locale-data-2.1.2 + rust-icu-normalizer-2.1.1 + rust-icu-normalizer-data-2.1.1 + rust-icu-properties-2.1.2 + rust-icu-properties-data-2.1.2 + rust-icu-provider-2.1.1 + rust-ident-case-1.0.1 + rust-idna-1.1.0 + rust-idna-adapter-1.2.1 + rust-ignore-0.4.25 + rust-image-0.25.9 + rust-include-dir-0.7.4 + rust-include-dir-macros-0.7.4 + rust-indenter-0.3.4 + rust-indexmap-1.9.3 + rust-indexmap-2.13.0 + rust-indoc-2.0.7 + rust-inotify-0.11.0 + rust-inotify-sys-0.1.5 + rust-inout-0.1.4 + rust-inventory-0.3.21 + rust-ipnet-2.11.0 + rust-iri-string-0.7.10 + rust-is-terminal-0.4.17 + rust-is-ci-1.2.0 + rust-is-terminal-polyfill-1.70.2 + rust-itertools-0.10.5 + rust-itertools-0.13.0 + rust-itertools-0.14.0 + rust-itoa-1.0.17 + rust-jiff-0.2.18 + rust-jiff-static-0.2.18 + rust-jni-0.21.1 + rust-jni-sys-0.3.0 + rust-jobserver-0.1.34 + rust-js-sys-0.3.85 + rust-keyring-3.6.3 + rust-kqueue-1.1.1 + rust-kqueue-sys-1.0.4 + rust-lalrpop-0.19.12 + rust-lalrpop-util-0.19.12 + rust-landlock-0.4.4 + rust-lazy-static-1.5.0 + rust-libc-0.2.180 + rust-libdbus-sys-0.2.7 + rust-libredox-0.1.12 + rust-libm-0.2.16 + rust-libsqlite3-sys-0.30.1 + rust-linux-keyutils-0.2.4 + rust-linux-raw-sys-0.11.0 + rust-litemap-0.8.1 + rust-lock-api-0.4.14 + rust-log-0.4.29 + rust-logos-0.12.1 + rust-logos-derive-0.12.1 + rust-lru-0.16.3 + rust-lru-slab-0.1.2 + rust-lsp-types-0.94.1 + rust-lzma-rs-0.3.0 + rust-lzma-sys-0.1.20 + rust-maplit-1.0.2 + rust-matchers-0.2.0 + rust-matchit-0.8.4 + rust-md-5-0.10.6 + rust-memchr-2.7.6 + rust-memoffset-0.6.5 + rust-memoffset-0.9.1 + rust-mime-0.3.17 + rust-mime-guess-2.0.5 + rust-minimal-lexical-0.2.1 + rust-miniz-oxide-0.8.9 + rust-mio-1.1.1 + rust-moxcms-0.7.11 + rust-multimap-0.10.1 + rust-native-tls-0.2.14 + rust-ndk-context-0.1.1 + rust-new-debug-unreachable-1.0.6 + rust-nibble-vec-0.1.0 + rust-nix-0.28.0 + rust-nix-0.29.0 + rust-nix-0.30.1 + rust-nom-7.1.3 + rust-normalize-line-endings-0.3.0 + rust-notify-8.2.0 + rust-notify-types-2.1.0 + rust-nu-ansi-term-0.50.3 + rust-nucleo-0.5.0.4253de9f + rust-nucleo-matcher-0.3.1 + rust-num-0.4.3 + rust-num-bigint-0.4.6 + rust-num-bigint-dig-0.8.6 + rust-num-complex-0.4.6 + rust-num-conv-0.2.0 + rust-num-integer-0.1.46 + rust-num-iter-0.1.45 + rust-num-rational-0.4.2 + rust-num-traits-0.2.19 + rust-num-cpus-1.17.0 + rust-num-threads-0.1.7 + rust-oauth2-5.0.0 + rust-objc2-0.6.3 + rust-objc2-cloud-kit-0.3.2 + rust-objc2-core-data-0.3.2 + rust-objc2-core-foundation-0.3.2 + rust-objc2-core-graphics-0.3.2 + rust-objc2-core-image-0.3.2 + rust-objc2-core-location-0.3.2 + rust-objc2-core-text-0.3.2 + rust-objc2-encode-4.1.0 + rust-objc2-foundation-0.3.2 + rust-objc2-io-surface-0.3.2 + rust-objc2-quartz-core-0.3.2 + rust-objc2-ui-kit-0.3.2 + rust-objc2-user-notifications-0.3.2 + rust-once-cell-1.21.3 + rust-once-cell-polyfill-1.70.2 + rust-openssl-0.10.75 + rust-openssl-macros-0.1.1 + rust-openssl-probe-0.1.6 + rust-openssl-probe-0.2.1 + rust-openssl-src-300.5.5+3.5.5 + rust-openssl-sys-0.9.111 + rust-opentelemetry-0.31.0 + rust-opentelemetry-appender-tracing-0.31.1 + rust-opentelemetry-http-0.31.0 + rust-opentelemetry-otlp-0.31.0 + rust-opentelemetry-proto-0.31.0 + rust-opentelemetry-semantic-conventions-0.31.0 + rust-opentelemetry-sdk-0.31.0 + rust-option-ext-0.2.0 + rust-ordered-stream-0.2.0 + rust-os-info-3.14.0 + rust-owo-colors-4.2.3 + rust-parking-2.2.1 + rust-parking-lot-0.12.5 + rust-parking-lot-core-0.9.12 + rust-paste-1.0.15 + rust-pastey-0.2.1 + rust-path-absolutize-3.1.1 + rust-path-dedot-3.1.1 + rust-pbkdf2-0.12.2 + rust-pem-rfc7468-0.7.0 + rust-percent-encoding-2.3.2 + rust-petgraph-0.6.5 + rust-phf-shared-0.11.3 + rust-pin-project-1.1.10 + rust-pin-project-internal-1.1.10 + rust-pin-project-lite-0.2.16 + rust-pin-utils-0.1.0 + rust-piper-0.2.4 + rust-pkg-config-0.3.32 + rust-pkcs1-0.7.5 + rust-pkcs8-0.10.2 + rust-png-0.18.0 + rust-polling-3.11.0 + rust-portable-atomic-1.13.1 + rust-portable-atomic-util-0.2.5 + rust-portable-pty-0.9.0 + rust-potential-utf-0.1.4 + rust-powerfmt-0.2.0 + rust-ppv-lite86-0.2.21 + rust-precomputed-hash-0.1.1 + rust-predicates-3.1.3 + rust-predicates-core-1.0.9 + rust-predicates-tree-1.0.12 + rust-pretty-assertions-1.4.1 + rust-proc-macro-crate-3.4.0 + rust-proc-macro2-1.0.106 + rust-process-wrap-9.0.1 + rust-proptest-1.9.0 + rust-prost-0.14.3 + rust-prost-derive-0.14.3 + rust-pxfm-0.1.27 + rust-quick-error-2.0.1 + rust-quinn-0.11.9 + rust-quinn-proto-0.11.13 + rust-quinn-udp-0.5.14 + rust-quote-1.0.44 + rust-r-efi-5.3.0 + rust-radix-trie-0.2.1 + rust-rand-0.8.5 + rust-rand-0.9.2 + rust-rand-chacha-0.3.1 + rust-rand-chacha-0.9.0 + rust-rand-core-0.6.4 + rust-rand-core-0.9.5 + rust-rand-xorshift-0.4.0 + rust-rayon-1.11.0 + rust-rayon-core-1.13.0 + rust-redox-syscall-0.5.18 + rust-redox-syscall-0.7.0 + rust-redox-users-0.4.6 + rust-redox-users-0.5.2 + rust-ref-cast-1.0.25 + rust-ref-cast-impl-1.0.25 + rust-regex-1.12.2 + rust-regex-automata-0.4.13 + rust-regex-lite-0.1.8 + rust-regex-syntax-0.6.29 + rust-regex-syntax-0.8.8 + rust-reqwest-0.12.28 + rust-ring-0.17.14 + rust-rmcp-0.12.0 + rust-rmcp-macros-0.12.0 + rust-rsa-0.9.10 + rust-runfiles-0.1.0.b56cbaa8 + rust-rustc-hash-2.1.1 + rust-rustix-1.1.3 + rust-rustls-0.23.36 + rust-rustls-native-certs-0.8.3 + rust-rustls-pki-types-1.14.0 + rust-rustls-webpki-0.103.9 + rust-rustversion-1.0.22 + rust-rustyline-14.0.0 + rust-ryu-1.0.22 + rust-same-file-1.0.6 + rust-scc-2.4.0 + rust-schannel-0.1.28 + rust-schemafy-0.5.2 + rust-schemafy-core-0.5.2 + rust-schemafy-lib-0.5.2 + rust-schemars-0.8.22 + rust-schemars-0.9.0 + rust-schemars-1.2.1 + rust-schemars-derive-0.8.22 + rust-schemars-derive-1.2.1 + rust-scopeguard-1.2.0 + rust-sdd-3.0.10 + rust-seccompiler-0.5.0 + rust-secret-service-4.0.0 + rust-security-framework-2.11.1 + rust-security-framework-3.5.1 + rust-security-framework-sys-2.15.0 + rust-semver-1.0.27 + rust-serde-1.0.228 + rust-serde-core-1.0.228 + rust-serde-derive-1.0.228 + rust-serde-derive-internals-0.29.1 + rust-serde-json-1.0.149 + rust-serde-path-to-error-0.1.20 + rust-serde-repr-0.1.20 + rust-serde-spanned-1.0.4 + rust-serde-urlencoded-0.7.1 + rust-serde-with-3.16.1 + rust-serde-with-macros-3.16.1 + rust-serde-yaml-0.9.34+deprecated + rust-serial-test-3.3.1 + rust-serial-test-derive-3.3.1 + rust-serial2-0.2.33 + rust-sha1-0.10.6 + rust-sha1-smol-1.0.1 + rust-sha2-0.10.9 + rust-sharded-slab-0.1.7 + rust-shared-library-0.1.9 + rust-shell-words-1.1.1 + rust-shlex-1.3.0 + rust-signal-hook-registry-1.4.8 + rust-signature-2.2.0 + rust-simd-adler32-0.3.8 + rust-similar-2.7.0 + rust-siphasher-1.0.2 + rust-slab-0.4.12 + rust-smallvec-1.15.1 + rust-socket2-0.6.2 + rust-spin-0.9.8 + rust-spki-0.7.3 + rust-sqlx-0.8.6 + rust-sqlx-core-0.8.6 + rust-sqlx-macros-0.8.6 + rust-sqlx-macros-core-0.8.6 + rust-sqlx-mysql-0.8.6 + rust-sqlx-postgres-0.8.6 + rust-sqlx-sqlite-0.8.6 + rust-sse-stream-0.2.1 + rust-stable-deref-trait-1.2.1 + rust-starlark-0.13.0 + rust-starlark-derive-0.13.0 + rust-starlark-map-0.13.0 + rust-starlark-syntax-0.13.0 + rust-static-assertions-1.1.0 + rust-streaming-iterator-0.1.9 + rust-string-cache-0.8.9 + rust-stringprep-0.1.5 + rust-strsim-0.10.0 + rust-strsim-0.11.1 + rust-strum-0.27.2 + rust-strum-macros-0.27.2 + rust-subtle-2.6.1 + rust-supports-color-2.1.0 + rust-supports-color-3.0.2 + rust-syn-1.0.109 + rust-syn-2.0.114 + rust-sync-wrapper-1.0.2 + rust-synstructure-0.13.2 + rust-sys-locale-0.3.2 + rust-system-configuration-0.6.1 + rust-system-configuration-sys-0.6.0 + rust-tempfile-3.24.0 + rust-term-0.7.0 + rust-termcolor-1.4.1 + rust-terminal-size-0.4.3 + rust-termtree-0.5.1 + rust-test-case-3.3.1 + rust-test-case-core-3.3.1 + rust-test-case-macros-3.3.1 + rust-test-log-0.2.19 + rust-test-log-macros-0.2.19 + rust-textwrap-0.11.0 + rust-thiserror-1.0.69 + rust-thiserror-2.0.18 + rust-thiserror-impl-1.0.69 + rust-thiserror-impl-2.0.18 + rust-thread-local-1.1.9 + rust-tiff-0.10.3 + rust-time-0.3.46 + rust-time-core-0.1.8 + rust-time-macros-0.2.26 + rust-tiny-keccak-2.0.2 + rust-tiny-http-0.12.0 + rust-tinystr-0.8.2 + rust-tinyvec-1.10.0 + rust-tinyvec-macros-0.1.1 + rust-tokio-1.49.0 + rust-tokio-macros-2.6.0 + rust-tokio-native-tls-0.3.1 + rust-tokio-rustls-0.26.4 + rust-tokio-stream-0.1.18 + rust-tokio-test-0.4.5 + rust-tokio-tungstenite-0.28.0.2ae536b0 + rust-tokio-util-0.7.18 + rust-toml-0.9.11+spec-1.1.0 + rust-toml-0.5.11 + rust-toml-datetime-0.7.5+spec-1.1.0 + rust-toml-edit-0.23.10+spec-1.0.0 + rust-toml-edit-0.24.0+spec-1.1.0 + rust-toml-parser-1.0.6+spec-1.1.0 + rust-toml-writer-1.0.6+spec-1.1.0 + rust-tonic-0.14.3 + rust-tonic-prost-0.14.3 + rust-tower-0.5.3 + rust-tower-http-0.6.8 + rust-tower-layer-0.3.3 + rust-tower-service-0.3.3 + rust-tracing-0.1.44 + rust-tracing-core-0.1.36 + rust-tracing-attributes-0.1.31 + rust-tracing-log-0.2.0 + rust-tracing-opentelemetry-0.32.1 + rust-tracing-subscriber-0.3.22 + rust-tracing-test-0.2.5 + rust-tracing-test-macro-0.2.5 + rust-tree-sitter-0.25.10 + rust-tree-sitter-bash-0.25.1 + rust-tree-sitter-language-0.1.7 + rust-try-lock-0.2.5 + rust-ts-rs-11.1.0 + rust-ts-rs-macros-11.1.0 + rust-tungstenite-0.28.0.f514de86 + rust-typenum-1.19.0 + rust-uds-windows-1.1.0 + rust-unarray-0.1.4 + rust-unicase-2.9.0 + rust-unicode-bidi-0.3.18 + rust-unicode-ident-1.0.22 + rust-unicode-normalization-0.1.25 + rust-unicode-properties-0.1.4 + rust-unicode-segmentation-1.12.0 + rust-unicode-width-0.1.14 + rust-unicode-xid-0.2.6 + rust-unsafe-libyaml-0.2.11 + rust-untrusted-0.9.0 + rust-url-2.5.8 + rust-urlencoding-2.1.3 + rust-utf-8-0.7.6 + rust-utf8-iter-1.0.4 + rust-utf8parse-0.2.2 + rust-uuid-1.20.0 + rust-valuable-0.1.1 + rust-vcpkg-0.2.15 + rust-version-check-0.9.5 + rust-wait-timeout-0.2.1 + rust-walkdir-2.5.0 + rust-want-0.3.1 + rust-wasi-0.11.1+wasi-snapshot-preview1 + rust-wasip2-1.0.2+wasi-0.2.9 + rust-wasite-0.1.0 + rust-wasm-bindgen-0.2.108 + rust-wasm-bindgen-futures-0.4.58 + rust-wasm-bindgen-macro-0.2.108 + rust-wasm-bindgen-macro-support-0.2.108 + rust-wasm-bindgen-shared-0.2.108 + rust-wasm-streams-0.4.2 + rust-web-sys-0.3.85 + rust-web-time-1.1.0 + rust-webbrowser-1.0.6 + rust-webpki-roots-0.26.11 + rust-webpki-roots-1.0.5 + rust-weezl-0.1.12 + rust-which-8.0.0 + rust-whoami-1.6.1 + rust-wildmatch-2.6.1 + rust-winapi-0.3.9 + rust-winapi-i686-pc-windows-gnu-0.4.0 + rust-winapi-util-0.1.11 + rust-winapi-x86-64-pc-windows-gnu-0.4.0 + rust-windows-0.58.0 + rust-windows-0.62.2 + rust-windows-collections-0.3.2 + rust-windows-core-0.58.0 + rust-windows-core-0.62.2 + rust-windows-future-0.3.2 + rust-windows-implement-0.58.0 + rust-windows-implement-0.60.2 + rust-windows-interface-0.58.0 + rust-windows-interface-0.59.3 + rust-windows-link-0.2.1 + rust-windows-numerics-0.3.1 + rust-windows-registry-0.6.1 + rust-windows-result-0.2.0 + rust-windows-result-0.4.1 + rust-windows-strings-0.1.0 + rust-windows-strings-0.5.1 + rust-windows-sys-0.45.0 + rust-windows-sys-0.48.0 + rust-windows-sys-0.52.0 + rust-windows-sys-0.59.0 + rust-windows-sys-0.60.2 + rust-windows-sys-0.61.2 + rust-windows-targets-0.42.2 + rust-windows-targets-0.48.5 + rust-windows-targets-0.52.6 + rust-windows-targets-0.53.5 + rust-windows-threading-0.2.1 + rust-windows-aarch64-gnullvm-0.42.2 + rust-windows-aarch64-gnullvm-0.48.5 + rust-windows-aarch64-gnullvm-0.52.6 + rust-windows-aarch64-gnullvm-0.53.1 + rust-windows-aarch64-msvc-0.42.2 + rust-windows-aarch64-msvc-0.48.5 + rust-windows-aarch64-msvc-0.52.6 + rust-windows-aarch64-msvc-0.53.1 + rust-windows-i686-gnu-0.42.2 + rust-windows-i686-gnu-0.48.5 + rust-windows-i686-gnu-0.52.6 + rust-windows-i686-gnu-0.53.1 + rust-windows-i686-gnullvm-0.52.6 + rust-windows-i686-gnullvm-0.53.1 + rust-windows-i686-msvc-0.42.2 + rust-windows-i686-msvc-0.48.5 + rust-windows-i686-msvc-0.52.6 + rust-windows-i686-msvc-0.53.1 + rust-windows-x86-64-gnu-0.42.2 + rust-windows-x86-64-gnu-0.48.5 + rust-windows-x86-64-gnu-0.52.6 + rust-windows-x86-64-gnu-0.53.1 + rust-windows-x86-64-gnullvm-0.42.2 + rust-windows-x86-64-gnullvm-0.48.5 + rust-windows-x86-64-gnullvm-0.52.6 + rust-windows-x86-64-gnullvm-0.53.1 + rust-windows-x86-64-msvc-0.42.2 + rust-windows-x86-64-msvc-0.48.5 + rust-windows-x86-64-msvc-0.52.6 + rust-windows-x86-64-msvc-0.53.1 + rust-winnow-0.7.14 + rust-winreg-0.10.1 + rust-winres-0.1.12 + rust-winsafe-0.0.19 + rust-wiremock-0.6.5 + rust-wit-bindgen-0.51.0 + rust-writeable-0.6.2 + rust-xdg-home-1.3.0 + rust-xz2-0.1.7 + rust-yansi-1.0.1 + rust-yoke-0.8.1 + rust-yoke-derive-0.8.1 + rust-zbus-4.4.0 + rust-zbus-macros-4.4.0 + rust-zbus-names-3.0.0 + rust-zerocopy-0.8.37 + rust-zerocopy-derive-0.8.37 + rust-zerofrom-0.1.6 + rust-zerofrom-derive-0.1.6 + rust-zeroize-1.8.2 + rust-zeroize-derive-1.4.3 + rust-zerotrie-0.2.3 + rust-zerovec-0.11.5 + rust-zerovec-derive-0.11.2 + rust-zip-2.4.2 + rust-zopfli-0.8.3 + rust-zstd-0.13.3 + rust-zstd-safe-7.2.4 + rust-zstd-sys-2.0.16+zstd.1.5.7 + rust-zmij-1.0.19 + rust-zune-core-0.4.12 + rust-zune-core-0.5.1 + rust-zune-jpeg-0.4.21 + rust-zune-jpeg-0.5.12 + rust-zvariant-4.2.0 + rust-zvariant-derive-4.2.0 + rust-zvariant-utils-2.1.0)) (complgen => (list rust-ahash-0.7.8 rust-ahash-0.8.11 diff --git a/gnu/packages/rust-sources.scm b/gnu/packages/rust-sources.scm index 3d61b320ba..82bdef53ee 100644 --- a/gnu/packages/rust-sources.scm +++ b/gnu/packages/rust-sources.scm @@ -678,3 +678,108 @@ intelligence.") webview, a tiny cross-platform library to render web-based GUIs as desktop applications.") (license license:expat))))) +(define-public rust-codex-0.0.0.785c0c43 + (let ((commit "785c0c43df941e6997ff3a9e8a9dd48da2661f20") + (revision "0")) + (hidden-package + (package + (name "rust-codex") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zed-industries/codex") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0rwj1ykknng39mhzna3fw3rcl3vngynsjdcj1namgkvw91zd9dl7")) + ;; TODO: Remove patches when Rust provides stable file locking API. + ;; The file_lock feature is tracked at + ;; . + (patches (search-patches "rust-codex-0.98.0-execpolicy-file-lock.patch" + "rust-codex-0.98.0-core-file-lock.patch" + "rust-codex-0.98.0-arg0-file-lock.patch" + "rust-codex-0.98.0-core-remove-self-dep.patch")))) + (build-system cargo-build-system) + (arguments + (list + #:skip-build? #t + #:cargo-package-crates + ;; Order matters: dependencies must come before packages that need them + ''("codex-async-utils" ; No internal deps + "codex-client" ; No internal deps + "codex-execpolicy" ; No internal deps + "codex-file-search" ; No internal deps + "codex-git" ; No internal deps + "codex-keyring-store" ; No internal deps + "codex-utils-absolute-path" ; No internal deps + "codex-utils-cache" ; No internal deps + "codex-utils-cargo-bin" ; No internal deps + "codex-utils-home-dir" ; No internal deps + "codex-utils-json-to-toml" ; No internal deps + "codex-utils-pty" ; No internal deps + "codex-utils-readiness" ; No internal deps + "codex-utils-string" ; No internal deps + "codex-utils-image" ; Depends on codex-utils-cache + "codex-apply-patch" ; Depends on codex-utils-cargo-bin + "codex-protocol" ; Depends on codex-git, codex-utils-* + "codex-windows-sandbox" ; Depends on codex-utils-absolute-path, codex-protocol + "codex-api" ; Depends on codex-client, codex-protocol + "codex-experimental-api-macros" ; Macro crate (must come before app-server-protocol) + "codex-app-server-protocol" ; Depends on codex-protocol, codex-experimental-api-macros + "codex-rmcp-client" ; Depends on codex-keyring-store, codex-protocol + "codex-otel" ; Depends on codex-app-server-protocol, codex-api + "codex-state" ; Depends on codex-protocol, codex-otel + "codex-core" ; Depends on many packages above + "codex-linux-sandbox" ; Depends on codex-core, codex-utils-absolute-path + "codex-arg0" ; Depends on codex-apply-patch, codex-core, codex-linux-sandbox + "codex-lmstudio" ; Depends on codex-core + "codex-login" ; Depends on codex-core + "codex-ollama" ; Depends on codex-core + "codex-common" ; Depends on codex-core, codex-lmstudio, codex-ollama + "codex-mcp-server") ; Depends on codex-core, codex-common + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir-to-workspace + (lambda _ + (chdir "codex-rs"))) + (add-after 'chdir-to-workspace 'patch-git-deps-to-vendor + (lambda _ + ;; Avoid git fetches in offline builds by pointing patches + ;; at the vendored sources provided via cargo-inputs. + (substitute* "Cargo.toml" + (("crossterm = \\{ git = [^}]+\\}") + "crossterm = { version = \"0.28.1\" }") + (("ratatui = \\{ git = [^}]+\\}") + "ratatui = { version = \"0.29.0\" }") + (("tokio-tungstenite = \\{ git = [^}]+\\}") + "tokio-tungstenite = { version = \"0.28.0\" }") + ;; Point nucleo git dependency to vendored checkout. + (("nucleo = \\{ git = [^}]+\\}") + "nucleo = { version = \"0.5.0\" }") + ;; Point runfiles git dependency to vendored checkout. + (("runfiles = \\{ git = [^}]+\\}") + "runfiles = { version = \"0.1.0\" }")))) + (add-after 'chdir-to-workspace 'add-version-to-workspace-deps + (lambda _ + ;; cargo package requires all dependencies to have versions. + ;; Add version = "0.0.0" to internal path dependencies. + (let ((cargo-files (find-files "." "^Cargo\\.toml$"))) + (substitute* cargo-files + ;; Handle inline deps: name = { path = "..." } + (("(codex-[a-z0-9-]+) = \\{ path = " all name) + (string-append name " = { version = \"0.0.0\", path = ")) + ;; Handle inline deps with package: name = { package = "...", path = "..." } + (("(codex-[a-z0-9-]+) = \\{ package = " all name) + (string-append name " = { version = \"0.0.0\", package = ")) + ;; Handle section deps: [dependencies.X] with path = "..." + (("^(path = \"\\.\\./[^\"]*\")" all path-line) + (string-append path-line "\nversion = \"0.0.0\""))))))))) + (inputs (cargo-inputs 'rust-codex-0.0.0.785c0c43)) + (home-page "https://github.com/zed-industries/codex") + (synopsis "Zed Codex workspace crates") + (description + "This package provides the workspace crates for the Zed Codex CLI +and runtime for AI-assisted coding.") + (license license:asl2.0)))))