Skip to content

Fix macOS build bundling wrong macmon binary#1797

Merged
Evanev7 merged 1 commit intomainfrom
alexcheema/fix-macmon-build-bundling
Mar 26, 2026
Merged

Fix macOS build bundling wrong macmon binary#1797
Evanev7 merged 1 commit intomainfrom
alexcheema/fix-macmon-build-bundling

Conversation

@AlexCheema
Copy link
Copy Markdown
Contributor

Motivation

PR #1747 fixed macmon support for M5 Pro/Max by pinning the swiftraccoon/macmon fork in flake.nix. This works when running from source (via Nix) but the distributed macOS .app build was still broken on M5 Pro/Max because it was bundling the wrong macmon.

The error on M5 Pro/Max:

macmon preflight failed with return code -6: thread 'main' panicked at src/sources.rs:394:41

Changes

  • Removed macmon from brew install in build-app.yml — this was installing the upstream vladkens/macmon which doesn't support M5 Pro/Max
  • Added a new step that resolves the pinned macmon fork from the Nix dev shell (same swiftraccoon/macmon at rev 9154d23 already defined in flake.nix) and adds it to $GITHUB_PATH
  • Added a safety brew uninstall macmon to ensure no Homebrew macmon can shadow the pinned version

Why It Works

PyInstaller bundles macmon via shutil.which("macmon"). Previously this found the Homebrew (upstream) binary. Now it finds the Nix-overlayed fork that has M5 Pro/Max support, because $GITHUB_PATH prepends the Nix store path before the PyInstaller step runs.

Test Plan

Manual Testing

  • Trigger a macOS build and verify the bundled macmon is the pinned fork
  • Run the built .app on M5 Pro/Max and confirm macmon preflight succeeds

Automated Testing

  • Existing CI build workflow will validate that the macmon binary is found and bundled correctly

…sion

The build was using `brew install macmon` which installs the upstream
vladkens/macmon that doesn't support M5 Pro/Max. Now uses the same
swiftraccoon/macmon fork pinned in flake.nix via `nix develop`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AlexCheema
Copy link
Copy Markdown
Contributor Author

AlexCheema commented Mar 26, 2026

Tested on a new macOS build. Works on both M5 Pro and M4 Max.

Copy link
Copy Markdown
Member

@Evanev7 Evanev7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

man i always forget about the build-app ci

@Evanev7 Evanev7 merged commit f318f9e into main Mar 26, 2026
7 checks passed
@Evanev7 Evanev7 deleted the alexcheema/fix-macmon-build-bundling branch March 26, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants