feat(nix): desktop darwin app bundle - #38253
Open
DavSanchez wants to merge 3 commits into
Open
Conversation
DavSanchez
force-pushed
the
feat/desktop-darwin-app-bundle
branch
from
June 4, 2026 10:45
2f8650e to
bac0fd2
Compare
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for addressing the missing macOS app-bundle workflow. The feature premise remains valid: current nix/desktop.nix:153-177 still produces only the flat $out/share/hermes-desktop layout.
Problems
nix/desktop.nix:164puts every renderer artifact underContents/Resources/app. Current main emitsinstall-stamp.jsonat the renderer root (nix/desktop.nix:134), while the runtime readsprocess.resourcesPath/install-stamp.jsonorAPP_ROOT/build/install-stamp.json(apps/desktop/electron/main.ts:231-234). A salvage onto current main would put the stamp atResources/app/install-stamp.json, where neither lookup finds it.nix/checks.nix:3-5limits full checks to Linux, and this PR has no reported checks. The new Darwin bundle layout needs a structural or launch-path verification.
Suggested changes
- Rework the bundle against current
nix/desktop.nix(rewritten in39d09453f) and keep resources consumed throughprocess.resourcesPathatContents/Resources. - Add Darwin-oriented output-layout coverage for
Applications/Hermes.app, the executable,Resources/app, and the root-level install stamp.
Automated hermes-sweeper review.
|
|
||
| # Put our renderer files in Resources/app/ (Electron expects app here) | ||
| mkdir -p $out/Applications/Hermes.app/Contents/Resources/app | ||
| cp -r ${renderer}/* $out/Applications/Hermes.app/Contents/Resources/app/ |
Contributor
There was a problem hiding this comment.
Current main emits install-stamp.json at the renderer root (nix/desktop.nix:134), but the runtime reads only process.resourcesPath/install-stamp.json or APP_ROOT/build/install-stamp.json (apps/desktop/electron/main.ts:231-234). Copying all renderer artifacts here moves it to Resources/app/install-stamp.json, which neither lookup reads after salvage; install that metadata at Contents/Resources separately.
DavSanchez
force-pushed
the
feat/desktop-darwin-app-bundle
branch
from
July 27, 2026 13:01
bac0fd2 to
03b2080
Compare
This was referenced Jul 28, 2026
Open
DavSanchez
force-pushed
the
feat/desktop-darwin-app-bundle
branch
from
August 18, 2026 10:01
03b2080 to
ca90ade
Compare
Renaming Electron Helper*.app to Hermes Helper*.app on Darwin only touched paths on disk — each helper's own Info.plist still referenced Electron internally (CFBundleName, CFBundleIdentifier). Patch those too. Also ad-hoc-sign the bundle (leaf-first: each helper, then the main binary, then the bundle itself) so it's internally consistent after the renames/edits above, matching how opencode/lmstudio and stdenv's own darwin fixup phase (signingUtils) already handle this — no Developer ID or Apple account required, `-s -` is ad-hoc. desktop-app-layout gains checks for both: no leftover "Electron" string in a helper's Info.plist, and `codesign --verify --deep --strict` passing on the finished bundle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Noticed the desktop app for Darwin lacked an app bundle when used via Nix so I thought on adding it.
Related Issue
Fixes #
Type of Change
Changes Made
desktopnix flake output so it creates an app bundle.Contents/MacOS/Hermesis the renamed Electron Mach-O binary (not a wrapper script) so the bundle can be codesigned and notarized; runtime env is delivered viaInfo.plistLSEnvironment. Thehermes-desktopcommand is a thin wrapper launching it fornix run/ CLI use.install-stamp.jsonatContents/Resources/so the runtime'sprocess.resourcesPathlookup finds it, and add adesktop-app-layoutflake check (nix/checks.nix) covering the bundle layout.How to Test
On macOS:
nix build .#desktop.open result/Applications/Hermes.appA structural check of the bundle layout (app, Mach-O executable,
Resources/app, root-level install stamp) runs on Darwin with:nix build .#checks.aarch64-darwin.desktop-app-layoutAlternatively (my use case for adding it):
desktopflake output to an existinghome-managerconfiguration (inhome.packages)home-manager switch~/Applications/Home Manager Apps.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs