From d964bbeabd121aac884bf1cb8e8596ce0c368e96 Mon Sep 17 00:00:00 2001 From: Jhony Elmer Angulo Fabian Date: Thu, 30 Apr 2026 14:59:39 -0500 Subject: [PATCH] codex: 0.125.0 -> 0.128.0 Keep the upstream release profile on Darwin to avoid ld64 ARM64 branch range limits while linking codex-cli on aarch64-darwin. --- pkgs/by-name/co/codex/package.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/co/codex/package.nix b/pkgs/by-name/co/codex/package.nix index 03387cde9e34..70cac402140c 100644 --- a/pkgs/by-name/co/codex/package.nix +++ b/pkgs/by-name/co/codex/package.nix @@ -25,21 +25,20 @@ }: rustPlatform.buildRustPackage (finalAttrs: { pname = "codex"; - version = "0.125.0"; + version = "0.128.0"; src = fetchFromGitHub { owner = "openai"; repo = "codex"; tag = "rust-v${finalAttrs.version}"; - hash = "sha256-q175gmBw+edb5+w8TM36yUeFsyIdB1/IwWzbxBbBmoA="; + hash = "sha256-v2W0eslPOPHxHX76+bnkE/f4y+MnQuopeOoAC5X16TA="; }; sourceRoot = "${finalAttrs.src.name}/codex-rs"; - cargoHash = "sha256-fDVlj7zAZnwP9YBaYaSQZXYYWrBm5IEyLT9zoorvzFg="; + cargoHash = "sha256-3NQ4UCfBpANhyoJJatd8m31cEugsd42Ye2BXuzlKC0c="; - # Match upstream's release build (codex only) and drop the expensive - # release profile tweaks that dominate cold build time in nixpkgs. + # Match upstream's release build for the codex binary only. cargoBuildFlags = [ "--package" "codex-cli" @@ -57,6 +56,11 @@ rustPlatform.buildRustPackage (finalAttrs: { substituteInPlace $cargoDepsCopy/*/webrtc-sys-*/build.rs \ --replace-fail "cargo:rustc-link-lib=static=webrtc" "cargo:rustc-link-lib=dylib=webrtc" + '' + # Keep upstream's release profile on Darwin. Without LTO/codegen-units=1, + # the aarch64-darwin binary grows enough for ld64 to hit ARM64 branch range + # limits while linking codex-cli. + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace Cargo.toml \ --replace-fail 'lto = "fat"' "" \ --replace-fail 'codegen-units = 1' ""