feat(quickemu): derive SHARE_PATH from QEMU binary#1819
Merged
flexiondotorg merged 2 commits intomasterfrom Jan 24, 2026
Merged
feat(quickemu): derive SHARE_PATH from QEMU binary#1819flexiondotorg merged 2 commits intomasterfrom
flexiondotorg merged 2 commits intomasterfrom
Conversation
- Add get_qemu_share_path() to resolve the QEMU binary realpath and derive a matching share directory (handles symlinks, Nix store paths, Homebrew, MacPorts and custom builds) - Replace ad-hoc brew/system logic in configure_bios with resolved share path - Fallback to /usr/share when no qemu firmware directory is found Improve firmware/OVMF lookup reliability for non-system QEMU installations. Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Remove sed expressions that replaced local SHARE_PATH and removed Homebrew check - Rely on existing darwin-specific substitutions and Nix-provided qemu paths - Simplify shellHook and avoid accidental replacements on non-Darwin systems Signed-off-by: Martin Wimpress <martin@wimpress.org>
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.
Summary
Derive SHARE_PATH from the actual QEMU binary location instead of using package-manager-specific detection (Homebrew). Adds a robust helper to resolve the share path used for firmware and data, and simplifies devshell.nix by removing now-unnecessary Darwin/Homebrew sed patches.
Changes
get_qemu_share_path()inquickemu:realpathwith macOS fallback when GNU coreutils are not available./.../bin/qemu-system-*→/.../share).qemufirmware directory and fall back to/usr/sharefor system installs.configure_bios()with a call toget_qemu_share_path.devshell.nix; keep OVMF firmware path patches.Benefits
devshell.nix.Testing
Related
Implements "SHARE_PATH from QEMU binary" from TODO.md Phase 2.