mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gnu: Add codex-acp@0.9.2.
* gnu/packages/patches/codex-acp-0.9.2-remove-patch-sections.patch: New file. * gnu/packages/patches/codex-acp-0.9.2-replace-result-flatten.patch: New file. * gnu/local.mk (dist_patch_DATA): Register them. * gnu/packages/rust-crates.scm (rust-actix-http-3.11.2, rust-actix-rt-2.11.0, rust-actix-server-2.6.0, rust-actix-web-4.12.1, rust-age-0.11.2, rust-age-core-0.11.0, rust-agent-client-protocol-0.9.4, rust-agent-client-protocol-schema-0.10.8, rust-allocative-0.3.4, rust-allocative-derive-0.3.3, rust-arc-swap-1.8.0, rust-assert-cmd-2.1.2, rust-async-lock-3.4.2, rust-asynk-strim-0.1.5, rust-axum-0.8.8, rust-axum-core-0.5.6, rust-base64ct-1.8.1, rust-base64ct-1.8.3, rust-borsh-1.6.0, rust-bytemuck-1.25.0, rust-bytes-1.11.1, rust-bytestring-1.5.0, rust-cc-1.2.51, rust-cc-1.2.52, rust-cc-1.2.55, rust-chrono-0.4.43, rust-clap-4.5.56, rust-clap-builder-4.5.56, rust-clap-complete-4.5.64, rust-clap-complete-4.5.65, rust-clap-derive-4.5.55, rust-cmake-0.1.57, rust-cmp-any-0.8.1, rust-compact-str-0.9.0, rust-const-hex-1.17.0, rust-convert-case-0.10.0, rust-crc-3.4.0, rust-crossterm-0.28.1.87db8bfa, rust-ctor-0.5.0, rust-ctor-0.6.3, rust-ctor-proc-macro-0.0.6, rust-ctor-proc-macro-0.0.7, rust-darling-0.23.0, rust-darling-core-0.23.0, rust-darling-macro-0.23.0, rust-data-encoding-2.10.0, rust-dbus-0.9.10, rust-dbus-0.9.9, rust-dbus-secret-service-4.1.0, rust-deadpool-0.12.3, rust-debugserver-types-0.5.0, rust-deflate64-0.1.10, rust-derive-more-2.1.1, rust-derive-more-impl-2.1.1, rust-diffy-0.4.2, rust-display-container-0.9.0, rust-dtor-0.1.0, rust-dtor-0.1.1, rust-dtor-proc-macro-0.0.6, rust-dupe-0.9.1, rust-dupe-derive-0.9.1, rust-endi-1.1.1, rust-endian-type-0.2.0, rust-env-flags-0.1.1, rust-erased-serde-0.3.31, rust-eventsource-stream-0.2.3, rust-find-msvc-tools-0.1.6, rust-find-msvc-tools-0.1.9, rust-fixed-decimal-0.7.0, rust-fixed-decimal-0.7.1, rust-flume-0.12.0, rust-fslock-0.2.1, rust-generator-0.8.8, rust-h2-0.4.13, rust-home-0.5.12, rust-hostname-0.4.2, rust-i18n-embed-0.15.4, rust-i18n-embed-fl-0.9.4, rust-iana-time-zone-0.1.65, rust-icu-decimal-2.1.1, rust-icu-decimal-data-2.1.1, rust-icu-locale-2.1.1, rust-icu-locale-data-2.1.1, rust-icu-locale-data-2.1.2, rust-image-0.25.9, rust-include-dir-0.7.4, rust-include-dir-macros-0.7.4, rust-indexmap-2.13.0, rust-insta-1.46.0, rust-insta-1.46.2, rust-instability-0.3.11, rust-inventory-0.3.21, rust-jiff-0.2.18, rust-jiff-static-0.2.18, rust-js-sys-0.3.83, rust-kasuari-0.4.11, rust-keyring-3.6.3, rust-lalrpop-0.19.12, rust-lalrpop-util-0.19.12, rust-landlock-0.4.4, rust-libc-0.2.179, rust-libdbus-sys-0.2.6, rust-libdbus-sys-0.2.7, rust-libredox-0.1.6, rust-lsp-types-0.94.1, rust-lzma-rs-0.3.0, rust-matchit-0.9.1, rust-moka-0.12.13, rust-moxcms-0.7.11, rust-notify-types-2.1.0, rust-nucleo-0.5.0.4253de9f, rust-num-bigint-dig-0.8.6, rust-num-conv-0.2.0, rust-oauth2-5.0.0, rust-objc2-cloud-kit-0.3.2, rust-objc2-core-data-0.3.2, rust-objc2-core-image-0.3.2, rust-objc2-core-text-0.3.2, rust-objc2-quartz-core-0.3.2, rust-objc2-ui-kit-0.3.2, rust-openssl-probe-0.2.0, rust-openssl-src-300.5.5+3.5.5, 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-sdk-0.31.0, rust-opentelemetry-semantic-conventions-0.31.0, rust-os-info-3.12.0, rust-os-info-3.14.0, rust-owo-colors-4.2.2, rust-owo-colors-4.2.3, rust-pastey-0.2.0, rust-pastey-0.2.1, rust-petgraph-0.8.3, rust-portable-atomic-1.13.1, rust-portable-atomic-util-0.2.5, rust-portable-pty-0.9.0, rust-proc-macro2-1.0.105, rust-process-wrap-9.0.0, rust-process-wrap-9.0.1, rust-proptest-1.9.0, rust-prost-0.14.1, rust-prost-0.14.3, rust-prost-derive-0.14.1, rust-prost-derive-0.14.3, rust-psl-2.1.184, rust-pxfm-0.1.27, rust-quick-xml-0.38.4, rust-quote-1.0.43, rust-radix-trie-0.3.0, rust-rama-boring-0.5.10, rust-rama-boring-sys-0.5.10, rust-rama-boring-tokio-0.5.10, rust-rama-core-0.3.0-alpha.4, rust-rama-dns-0.3.0-alpha.4, rust-rama-error-0.3.0-alpha.4, rust-rama-http-0.3.0-alpha.4, rust-rama-http-backend-0.3.0-alpha.4, rust-rama-http-core-0.3.0-alpha.4, rust-rama-http-headers-0.3.0-alpha.4, rust-rama-http-types-0.3.0-alpha.4, rust-rama-macros-0.3.0-alpha.4, rust-rama-net-0.3.0-alpha.4, rust-rama-socks5-0.3.0-alpha.4, rust-rama-tcp-0.3.0-alpha.4, rust-rama-tls-boring-0.3.0-alpha.4, rust-rama-udp-0.3.0-alpha.4, rust-rama-unix-0.3.0-alpha.4, rust-rama-utils-0.3.0-alpha.4, rust-ratatui-0.29.0.9b2ad129, rust-ratatui-core-0.1.0, rust-ratatui-macros-0.6.0, rust-redox-syscall-0.5.15, rust-redox-syscall-0.7.0, rust-regex-lite-0.1.8, rust-resolv-conf-0.7.6, rust-rmcp-0.12.0, rust-rmcp-macros-0.12.0, rust-rsa-0.9.10, rust-runfiles-0.1.0.b56cbaa8, rust-rust-embed-8.11.0, rust-rust-embed-impl-8.11.0, rust-rust-embed-utils-8.11.0, rust-rustc-demangle-0.1.27, rust-rustix-1.1.3, rust-rustls-pki-types-1.13.2, rust-schemafy-0.5.2, rust-schemafy-core-0.5.2, rust-schemafy-lib-0.5.2, rust-schemars-1.2.0, rust-schemars-1.2.1, rust-schemars-derive-1.2.0, rust-schemars-derive-1.2.1, rust-seccompiler-0.5.0, rust-secret-service-4.0.0, rust-self-cell-1.2.2, rust-sentry-0.46.0, rust-sentry-0.46.1, rust-sentry-actix-0.46.0, rust-sentry-actix-0.46.1, rust-sentry-backtrace-0.46.0, rust-sentry-backtrace-0.46.1, rust-sentry-contexts-0.46.0, rust-sentry-contexts-0.46.1, rust-sentry-core-0.46.0, rust-sentry-core-0.46.1, rust-sentry-debug-images-0.46.0, rust-sentry-debug-images-0.46.1, rust-sentry-panic-0.46.0, rust-sentry-panic-0.46.1, rust-sentry-tracing-0.46.0, rust-sentry-tracing-0.46.1, rust-sentry-types-0.46.0, rust-sentry-types-0.46.1, rust-serde-html-form-0.3.2, rust-serde-json-1.0.148, rust-serde-spanned-1.0.4, rust-serde-with-3.16.1, rust-serde-with-macros-3.16.1, rust-serial-test-3.3.1, rust-serial-test-derive-3.3.1, rust-serial2-0.2.31, rust-shell-words-1.1.1, rust-signal-hook-mio-0.2.5, rust-signal-hook-registry-1.4.8, rust-siphasher-1.0.2, rust-slab-0.4.12, rust-smol-str-0.3.5, rust-sse-stream-0.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-syn-2.0.113, rust-tempfile-3.24.0, rust-test-log-0.2.19, rust-test-log-macros-0.2.19, rust-time-0.3.46, rust-time-core-0.1.8, rust-time-macros-0.2.26, rust-tokio-graceful-0.2.2, rust-tokio-stream-0.1.18, rust-tokio-test-0.4.5, rust-tokio-tungstenite-0.28.0, rust-tokio-tungstenite-0.28.0.2ae536b0, rust-toml-0.9.10+spec-1.1.0, rust-toml-0.9.11+spec-1.1.0, rust-toml-0.9.5, 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.2, rust-tonic-0.14.3, rust-tonic-prost-0.14.2, rust-tonic-prost-0.14.3, rust-tracing-0.1.43, rust-tracing-appender-0.2.4, rust-tracing-attributes-0.1.31, rust-tracing-core-0.1.35, rust-tracing-opentelemetry-0.32.0, rust-tracing-opentelemetry-0.32.1, rust-tracing-subscriber-0.3.22, rust-tree-magic-mini-3.2.2, rust-tree-sitter-0.25.10, rust-tree-sitter-bash-0.25.0, rust-tree-sitter-bash-0.25.1, rust-tree-sitter-highlight-0.25.10, rust-tree-sitter-language-0.1.6, rust-tree-sitter-language-0.1.7, rust-ts-rs-11.0.1, rust-ts-rs-11.1.0, rust-ts-rs-macros-11.0.1, rust-ts-rs-macros-11.1.0, rust-tui-scrollbar-0.2.1, rust-tungstenite-0.28.0, rust-tungstenite-0.28.0.f514de86, rust-unicase-2.9.0, rust-ureq-3.1.4, rust-ureq-proto-0.5.3, rust-uuid-1.19.0, rust-uuid-1.20.0, rust-vt100-0.16.2, rust-wasm-bindgen-0.2.106, rust-wasm-bindgen-backend-0.2.108, rust-wasm-bindgen-futures-0.4.56, rust-wasm-bindgen-macro-0.2.106, rust-wasm-bindgen-macro-support-0.2.106, rust-wasm-bindgen-shared-0.2.106, rust-wayland-backend-0.3.12, rust-wayland-client-0.31.12, rust-wayland-protocols-0.32.10, rust-wayland-protocols-wlr-0.3.10, rust-wayland-scanner-0.31.8, rust-wayland-sys-0.31.8, rust-web-sys-0.3.83, rust-webbrowser-1.0.6, rust-webpki-root-certs-1.0.4, rust-webpki-root-certs-1.0.5, rust-webpki-roots-1.0.2, rust-webpki-roots-1.0.5, rust-wildcard-0.3.0, rust-wildmatch-2.6.1, rust-windows-registry-0.6.1, rust-winsplit-0.1.0, rust-wiremock-0.6.5, rust-wl-clipboard-rs-0.9.3, rust-zerocopy-0.8.31, rust-zerocopy-0.8.37, rust-zerocopy-derive-0.8.31, rust-zerocopy-derive-0.8.37, rust-zeroize-derive-1.4.3, rust-zmij-1.0.12, rust-zmij-1.0.19, rust-zopfli-0.8.3, rust-zune-core-0.5.0, rust-zune-core-0.5.1, rust-zune-jpeg-0.5.12, rust-zune-jpeg-0.5.5, rust-zune-jpeg-0.5.8): New variables. * gnu/packages/rust-crates.scm (lookup-cargo-inputs) [codex-acp]: New entry. * gnu/packages/rust-apps.scm (codex-acp): New variable. Change-Id: I46a5fc158be35558e2690054dd022c28790abd41
This commit is contained in:
@@ -1123,6 +1123,8 @@ dist_patch_DATA = \
|
||||
%D%/packages/patches/clucene-gcc-14.patch \
|
||||
%D%/packages/patches/clucene-pkgconfig.patch \
|
||||
%D%/packages/patches/coda-use-system-libs.patch \
|
||||
%D%/packages/patches/codex-acp-0.9.2-remove-patch-sections.patch \
|
||||
%D%/packages/patches/codex-acp-0.9.2-replace-result-flatten.patch \
|
||||
%D%/packages/patches/cogl-fix-double-free.patch \
|
||||
%D%/packages/patches/collada-dom-boost.patch \
|
||||
%D%/packages/patches/collectd-5.11.0-noinstallvar.patch \
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
Author: Danny Milosavljevic <dannym@friendly-machines.com>
|
||||
Date: 2026-02-08
|
||||
License: ASL2.0
|
||||
|
||||
Remove [patch.crates-io] and [patch.'ssh://...'] sections.
|
||||
|
||||
These sections point to git repositories which are unavailable in an
|
||||
offline build. The vendored tokio-tungstenite and tungstenite forks
|
||||
are provided as cargo-inputs instead.
|
||||
|
||||
diff -u a/Cargo.toml b/Cargo.toml
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -47,8 +47,2 @@
|
||||
unused = "warn"
|
||||
-
|
||||
-[patch.crates-io]
|
||||
-tokio-tungstenite = { git = "https://github.com/JakkuSakura/tokio-tungstenite", branch = "proxy-support" }
|
||||
-
|
||||
-[patch.'ssh://git@github.com/JakkuSakura/tungstenite-rs.git']
|
||||
-tungstenite = { git = "https://github.com/JakkuSakura/tungstenite-rs", branch = "proxy-support" }
|
||||
@@ -0,0 +1,52 @@
|
||||
Author: Danny Milosavljevic <dannym@friendly-machines.com>
|
||||
Date: 2026-02-08
|
||||
License: ASL2.0
|
||||
|
||||
Replace Result::flatten() with and_then(|x| x).
|
||||
|
||||
Result::flatten() was stabilized in Rust 1.89.0 but the build
|
||||
toolchain only provides Rust 1.88.0. Use the equivalent
|
||||
.and_then(|x| x) form which works on all stable Rust versions.
|
||||
|
||||
diff -u a/src/local_spawner.rs b/src/local_spawner.rs
|
||||
--- a/src/local_spawner.rs
|
||||
+++ b/src/local_spawner.rs
|
||||
@@ -156,7 +156,7 @@
|
||||
});
|
||||
rx.recv()
|
||||
.map_err(|e| std::io::Error::other(e.to_string()))
|
||||
- .flatten()
|
||||
+ .and_then(|x| x)
|
||||
}
|
||||
|
||||
fn write(&self, path: &std::path::Path, contents: &[u8]) -> std::io::Result<()> {
|
||||
@@ -174,7 +174,7 @@
|
||||
});
|
||||
rx.recv()
|
||||
.map_err(|e| std::io::Error::other(e.to_string()))
|
||||
- .flatten()
|
||||
+ .and_then(|x| x)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
let file = rx
|
||||
.await
|
||||
.map_err(|e| std::io::Error::other(e.to_string()))
|
||||
- .flatten()?;
|
||||
+ .and_then(|x| x)?;
|
||||
|
||||
Ok(Box::new(tokio::io::BufReader::new(Cursor::new(file.into_bytes()))) as _)
|
||||
})
|
||||
diff -u a/src/thread.rs b/src/thread.rs
|
||||
--- a/src/thread.rs
|
||||
+++ b/src/thread.rs
|
||||
@@ -1817,7 +1817,7 @@
|
||||
let mut new_custom_prompts = load_custom_prompts
|
||||
.await
|
||||
.map_err(|_| Error::internal_error())
|
||||
- .flatten()
|
||||
+ .and_then(|x| x)
|
||||
.inspect_err(|e| error!("Failed to load custom prompts {e:?}"))
|
||||
.unwrap_or_default();
|
||||
|
||||
@@ -712,6 +712,49 @@ through tools like `gdb`.")
|
||||
"This package provides CLI Tool for codeberg similar to gh and glab.")
|
||||
(license license:agpl3+)))
|
||||
|
||||
(define-public codex-acp
|
||||
(package
|
||||
(name "codex-acp")
|
||||
(version "0.9.2")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/zed-industries/codex-acp")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "190sq6s6jfz8dkj1y8305r7x6ln86qqr2j1bnfjci7f1x2wyzmsj"))
|
||||
(patches (search-patches "codex-acp-0.9.2-remove-patch-sections.patch"
|
||||
"codex-acp-0.9.2-replace-result-flatten.patch"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:rust rust-1.88
|
||||
#:install-source? #f
|
||||
;; Skip doctests (--doc) because rustdoc is unavailable for non-default
|
||||
;; Rust versions in Guix.
|
||||
#:cargo-test-flags '(list "--lib" "--bins" "--tests")
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'patch-codex-deps
|
||||
(lambda _
|
||||
;; Rewrite git dependencies to use vendored sources from rust-codex
|
||||
(substitute* "Cargo.toml"
|
||||
(("git = \"https://github.com/zed-industries/codex\", branch = \"acp\"")
|
||||
"version = \"0.0.0\"")))))))
|
||||
(native-inputs (list pkg-config))
|
||||
(inputs (cons* openssl sqlite `(,zstd "lib") (cargo-inputs 'codex-acp)))
|
||||
(home-page "https://github.com/zed-industries/codex-acp")
|
||||
(synopsis "ACP-compatible agent bridging Zed Codex with ACP clients")
|
||||
(description
|
||||
"This package provides an Agent Client Protocol (ACP) compatible agent
|
||||
that bridges the Zed Codex runtime with ACP clients over stdio. It
|
||||
supports multiple LLM providers through configuration in
|
||||
@file{~/.codex/config.toml} and integrates with MCP servers for filesystem
|
||||
operations.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public complgen
|
||||
(package
|
||||
(name "complgen")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user