|
75 | 75 | cp -R ${./computer-use-linux} "$out/computer-use-linux" |
76 | 76 | chmod -R u+w "$out" |
77 | 77 | ''; |
| 78 | + notificationActionsBuildSource = pkgs.runCommandLocal "codex-notification-actions-linux-source" { } '' |
| 79 | + mkdir -p "$out" |
| 80 | + cp ${./Cargo.lock} "$out/Cargo.lock" |
| 81 | + cat > "$out/Cargo.toml" <<'EOF' |
| 82 | + [workspace] |
| 83 | + members = ["notification-actions-linux"] |
| 84 | + resolver = "2" |
| 85 | + EOF |
| 86 | + cp -R ${./notification-actions-linux} "$out/notification-actions-linux" |
| 87 | + chmod -R u+w "$out" |
| 88 | + ''; |
78 | 89 | nativeModulesBuildSupport = pkgs.runCommandLocal "codex-native-modules-build-support" { } '' |
79 | 90 | mkdir -p "$out/scripts/lib" |
80 | 91 | cp ${./scripts/lib/native-modules.sh} "$out/scripts/lib/native-modules.sh" |
|
161 | 172 | ''; |
162 | 173 | }; |
163 | 174 |
|
| 175 | + codexNotificationActionsBinary = pkgs.rustPlatform.buildRustPackage { |
| 176 | + pname = "codex-notification-actions-linux"; |
| 177 | + version = "0.1.0"; |
| 178 | + src = notificationActionsBuildSource; |
| 179 | + |
| 180 | + cargoLock = { |
| 181 | + lockFile = ./Cargo.lock; |
| 182 | + }; |
| 183 | + |
| 184 | + cargoBuildFlags = [ |
| 185 | + "-p" |
| 186 | + "codex-notification-actions-linux" |
| 187 | + ]; |
| 188 | + |
| 189 | + doCheck = true; |
| 190 | + |
| 191 | + installPhase = '' |
| 192 | + runHook preInstall |
| 193 | + release_dir="target/''${CARGO_BUILD_TARGET:-${pkgs.stdenv.hostPlatform.rust.rustcTarget}}/release" |
| 194 | + if [ ! -d "$release_dir" ]; then |
| 195 | + release_dir="target/release" |
| 196 | + fi |
| 197 | + install -Dm0755 "$release_dir/codex-notification-actions-linux" "$out/bin/codex-notification-actions-linux" |
| 198 | + runHook postInstall |
| 199 | + ''; |
| 200 | + }; |
| 201 | + |
164 | 202 | codexMcpHelperReaper = pkgs.rustPlatform.buildRustPackage { |
165 | 203 | pname = "codex-mcp-helper-reaper"; |
166 | 204 | version = "0.1.0"; |
|
497 | 535 | export CODEX_LINUX_COMPUTER_USE_BACKEND_SOURCE="${codexComputerUseBinaries}/bin/codex-computer-use-linux" |
498 | 536 | export CODEX_LINUX_COMPUTER_USE_COSMIC_SOURCE="${codexComputerUseBinaries}/bin/codex-computer-use-cosmic" |
499 | 537 | export CODEX_CHROME_EXTENSION_HOST_SOURCE="${codexComputerUseBinaries}/bin/codex-chrome-extension-host" |
| 538 | + export CODEX_NOTIFICATION_ACTIONS_SOURCE="${codexNotificationActionsBinary}/bin/codex-notification-actions-linux" |
500 | 539 | ${pkgs.lib.optionalString (builtins.elem "mcp-helper-reaper" linuxFeatureIds) '' |
501 | 540 | export CODEX_MCP_HELPER_REAPER_SOURCE="${codexMcpHelperReaper}/bin/codex-mcp-helper-reaper" |
502 | 541 | ''} |
|
700 | 739 | cd "$source_dir" |
701 | 740 | export CODEX_INSTALL_DIR="''${CODEX_INSTALL_DIR:-$root_dir/codex-app}" |
702 | 741 | export CODEX_MANAGED_NODE_SOURCE="${pkgs.nodejs}" |
| 742 | + export CODEX_NOTIFICATION_ACTIONS_SOURCE="${codexNotificationActionsBinary}/bin/codex-notification-actions-linux" |
703 | 743 | ${pkgs.bash}/bin/bash "$source_dir/install.sh" "$source_dir/Codex.dmg" "$@" |
704 | 744 |
|
705 | 745 | install_dir="''${CODEX_INSTALL_DIR:-$root_dir/codex-app}" |
|
719 | 759 | }; |
720 | 760 |
|
721 | 761 | checks = { |
| 762 | + notification-actions-linux = codexNotificationActionsBinary; |
| 763 | + notification-actions-installer = pkgs.runCommand "codex-notification-actions-installer-check" { } '' |
| 764 | + grep -F 'CODEX_NOTIFICATION_ACTIONS_SOURCE=' ${installer}/bin/codex-desktop-installer >/dev/null |
| 765 | + touch "$out" |
| 766 | + ''; |
722 | 767 | nix-linux-features-evaluation = import ./nix/linux-features-test.nix { |
723 | 768 | inherit pkgs self system; |
724 | 769 | }; |
|
0 commit comments