codex: 0.25.0 -> 0.27.0

This commit is contained in:
André Silva
2025-08-29 09:55:04 +01:00
parent 63b8f960a9
commit 09e0394a71
+9 -56
View File
@@ -3,7 +3,6 @@
stdenv,
rustPlatform,
fetchFromGitHub,
gitMinimal,
installShellFiles,
nix-update-script,
pkg-config,
@@ -13,13 +12,13 @@
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "codex";
version = "0.25.0";
version = "0.27.0";
src = fetchFromGitHub {
owner = "openai";
repo = "codex";
tag = "rust-v${finalAttrs.version}";
hash = "sha256-a/cUg8yLW4vGPiTtqhyUdkV79JbOB40N4V7Asney7sk=";
hash = "sha256-vsZmHkph2rrb0K+ZRymweRculh+SIASCJCRP3V09hKU=";
};
sourceRoot = "${finalAttrs.src.name}/codex-rs";
@@ -33,59 +32,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
buildInputs = [ openssl ];
nativeCheckInputs = [ gitMinimal ];
__darwinAllowLocalNetworking = true;
preCheck = ''
# Disables sandbox tests which want to access /usr/bin/touch
export CODEX_SANDBOX=seatbelt
# Skips tests that require networking
export CODEX_SANDBOX_NETWORK_DISABLED=1
# Required by ui_snapshot_add_details and ui_snapshot_update_details_with_rename
export TERM=dumb
# Required by azure_overrides_assign_properties_used_for_responses_url and env_var_overrides_loaded_auth
export USER=test
'';
checkFlags = [
# Wants to access unix sockets
"--skip=allow_unix_socketpair_recvfrom"
# Needs access to python3. However, adding python3 to nativeCheckInputs doesn't resolve the issue
"--skip=exec_command::session_manager::tests::session_manager_streams_and_truncates_from_now"
"--skip=python_multiprocessing_lock_works_under_sandbox"
# Version 0.0.0 hardcoded
"--skip=test_conversation_create_and_send_message_ok"
"--skip=test_send_message_session_not_found"
"--skip=test_send_message_success"
"--skip=suite::auth::get_auth_status_no_auth"
"--skip=suite::auth::get_auth_status_with_api_key"
"--skip=suite::auth::get_auth_status_with_api_key_no_include_token"
"--skip=suite::login::login_and_cancel_chatgpt"
"--skip=suite::login::logout_chatgpt_removes_auth"
# Tests fail
"--skip=diff_render::tests::ui_snapshot_add_details"
"--skip=diff_render::tests::ui_snapshot_update_details_with_rename"
"--skip=diff_render::tests::ui_snapshot_blank_context_line"
"--skip=diff_render::tests::ui_snapshot_single_line_replacement_counts"
"--skip=diff_render::tests::ui_snapshot_vertical_ellipsis_between_hunks"
# Needs acces to sleep. However, adding coreutils to nativeCheckInputs doesn't resolve the issue
"--skip=suite::exec_stream_events::test_aggregated_output_interleaves_in_order"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Wants to access /bin/zsh
"--skip=shell::tests::test_run_with_profile_escaping_and_execution"
# Requires access to the Apple system configuration
"--skip=azure_overrides_assign_properties_used_for_responses_url"
"--skip=env_var_overrides_loaded_auth"
"--skip=includes_base_instructions_override_in_request"
"--skip=includes_user_instructions_message_in_request"
"--skip=originator_config_override_is_used"
"--skip=per_turn_overrides_keep_cached_prefix_and_key_constant"
"--skip=overrides_turn_context_but_keeps_cached_prefix_and_key_constant"
"--skip=prefixes_context_and_instructions_once_and_consistently_across_requests"
"--skip=test_apply_patch_tool"
"--skip=suite::prompt_caching::codex_mini_latest_tools"
"--skip=suite::prompt_caching::prompt_tools_are_consistent_across_requests"
];
# NOTE: part of the test suite requires access to networking, local shells,
# apple system configuration, etc. since this is a very fast moving target
# (for now), with releases happening every other day, constantly figuring out
# which tests need to be skipped, or finding workarounds, was too burdensome,
# and in practice not adding any real value. this decision may be reversed in
# the future once this software stabilizes.
doCheck = false;
postInstall = lib.optionalString installShellCompletions ''
installShellCompletion --cmd codex \