diff --git a/pkgs/by-name/co/codex/package.nix b/pkgs/by-name/co/codex/package.nix index abb341eb56ef..dd9ddcb0d582 100644 --- a/pkgs/by-name/co/codex/package.nix +++ b/pkgs/by-name/co/codex/package.nix @@ -25,25 +25,24 @@ }: rustPlatform.buildRustPackage (finalAttrs: { pname = "codex"; - version = "0.121.0"; + version = "0.122.0"; src = fetchFromGitHub { owner = "openai"; repo = "codex"; tag = "rust-v${finalAttrs.version}"; - hash = "sha256-wjiUMox9V5tFggNgaFyHXWhRlpPerK7W+U/eR2Ddbbc="; + hash = "sha256-CpXWP64URsgt/PhQrUkrT87KG633hxRUIY0wWrTFmjk="; }; sourceRoot = "${finalAttrs.src.name}/codex-rs"; - cargoHash = "sha256-zpQ0vg9XuarLfdZYiRIhcwLHUOdunNbOb5xLW3MPzp8="; + cargoHash = "sha256-2qtMLWSdYWJ+blNfCHXtgmzizuM1HgpTGa5RQ3U/AEM="; - # Match upstream's release build (codex only, no fat LTO) to cut build time. + # Match upstream's release build (codex only) and drop the expensive + # release profile tweaks that dominate cold build time in nixpkgs. cargoBuildFlags = [ "--package" "codex-cli" - "--config" - ''profile.release.lto="off"'' ]; cargoCheckFlags = [ "--package" @@ -57,6 +56,10 @@ rustPlatform.buildRustPackage (finalAttrs: { # to use the shared library instead substituteInPlace $cargoDepsCopy/*/webrtc-sys-*/build.rs \ --replace-fail "cargo:rustc-link-lib=static=webrtc" "cargo:rustc-link-lib=dylib=webrtc" + + substituteInPlace Cargo.toml \ + --replace-fail 'lto = "fat"' "" \ + --replace-fail 'codegen-units = 1' "" ''; nativeBuildInputs = [