- Ruby 100%
| Formula | ||
| README.md | ||
homebrew-cutedisc
A Homebrew tap that builds cutedisc — a Qt-based Subsonic/Navidrome desktop client — from source on macOS.
Install
brew tap cutedisc/cutedisc \
ssh://git@git.billenius.com:2222/cutedisc/homebrew-cutedisc.git
brew install --HEAD cutedisc
You need SSH access to git.billenius.com:2222 since the formula is
--HEAD-only: it clones cutedisc/cutedisc at install time and builds tip of
master. To pick up upstream changes later:
brew reinstall --HEAD cutedisc
What the install does
- Builds cutedisc via CMake + Ninja, depending on Homebrew's
qt,qtkeychain, and (build-only)librsvg. - Drops
cutedisc.appinto the formula's prefix ($(brew --prefix)/opt/cutedisc/cutedisc.app). - Ad-hoc signs the bundle with the stable identifier
se.billenius.cutedisc. macOS Keychain keys access decisions to the bundle's signature; a stable identifier means the user is prompted at most once per install, not on every launch. - Installs two PATH shims:
cutedisc— launches the bundle's binary directly (useful from a terminal, tmux, or anywhereopen -awould be awkward).cutedisc-add-to-applications— anosascriptthat opens a branded dialog (with cutedisc's icon) asking whether to addcutedisc.appto/Applications. On "Add", it delegates to Finder, which is the only process macOS TCC permits to write into/Applicationswithoutsudo. The result is a Finder alias at/Applications/cutedisc.appthat Spotlight, Launchpad, and the Dock all treat as the real app.
- Auto-runs
cutedisc-add-to-applicationsat the end ofbrew installon interactive (Aqua) sessions. The helper is detached vialaunchctl asuserso the dialog survivesbrew's exit. Headless installs (CI, SSH,brew bundlefrom a remote box) skip the popup automatically becauselaunchctl managernamereports a non-Aqua session.
To suppress the popup on future installs:
HOMEBREW_NO_AUTO_UPDATE_DIALOG=1 brew install --HEAD cutedisc
Why no Cask?
Casks are designed around prebuilt artefacts — they download a tarball/DMG
and copy the bundle into /Applications. Without a macOS CI pipeline
producing signed cutedisc releases, the closest thing we have is this:
formula builds from source, a helper script puts the result into
/Applications via Finder. The user experience is comparable
(brew install → branded popup → app in /Applications), at the cost of a
~20-second build on first install.
Updating the formula
When the upstream cutedisc repo changes in a way the formula needs to know
about (new build dep, new entry point, bumping the minimum Qt version,
etc.), edit Formula/cutedisc.rb and push. Consumers pick up the change
the next time they run brew update && brew reinstall --HEAD cutedisc.
If you don't have a local clone of this tap:
git clone ssh://git@git.billenius.com:2222/cutedisc/homebrew-cutedisc.git
Local development on the tap itself
Homebrew refuses to install formulae passed by raw path — they have to
live inside a tap directory under $(brew --repository)/Library/Taps/.
Scaffold a throwaway tap on your machine, copy this formula in, and
install from there:
brew tap-new --no-git love/cutedisc-local
cp Formula/cutedisc.rb \
"$(brew --repository love/cutedisc-local)/Formula/"
brew audit --strict love/cutedisc-local/cutedisc
brew install --HEAD --build-from-source love/cutedisc-local/cutedisc
brew test love/cutedisc-local/cutedisc # runs the formula's `test do` block
Iterate:
# edit Formula/cutedisc.rb…
cp Formula/cutedisc.rb \
"$(brew --repository love/cutedisc-local)/Formula/"
brew reinstall --HEAD --build-from-source love/cutedisc-local/cutedisc
Clean up when done:
brew untap love/cutedisc-local
Uninstall
brew uninstall cutedisc
# The Finder alias in /Applications is not removed automatically; drag
# it to the Trash from Finder if you want it gone.
rm /Applications/cutedisc.app 2>/dev/null
Troubleshooting
The keychain prompt keeps appearing on every launch.
The bundle is ad-hoc signed with a stable identifier
(se.billenius.cutedisc), so macOS Keychain should remember "Always
Allow" between launches. If it doesn't, you have a stale Keychain entry
from an earlier ad-hoc identity. Wipe it:
security delete-generic-password -s cutedisc
Next launch will recreate the entry under the current signature.
The "Add to /Applications" popup didn't appear during brew install.
The dialog is gated on launchctl managername == "Aqua" — i.e. you have
an active GUI session. SSH and headless installs are silent by design.
Run it manually:
cutedisc-add-to-applications
I want the app in /Applications without using the popup.
Drag $(brew --prefix)/opt/cutedisc/cutedisc.app from Finder into
/Applications yourself. Or, since it's a true bundle (not a wrapper),
copy it: sudo cp -R $(brew --prefix)/opt/cutedisc/cutedisc.app /Applications/.