feat(homebrew): add homebrew-core formula (#810)

This commit is contained in:
Steven Enamakel
2026-04-22 14:51:02 -07:00
committed by GitHub
parent 15a9c6f780
commit 488dbbd7ec
5 changed files with 155 additions and 2 deletions
+54
View File
@@ -0,0 +1,54 @@
# Homebrew Core Submission
This repository currently supports two Homebrew channels:
- `tinyhumansai/openhuman` tap: the existing prebuilt-binary formula used by end users today.
- `homebrew/core` candidate: a source-build formula prepared for submission to Homebrew's official core tap.
The `homebrew/core` candidate lives at [`packages/homebrew-core/openhuman.rb.in`](../packages/homebrew-core/openhuman.rb.in). It is a template, not the final submitted formula, because `homebrew/core` requires a real release tarball checksum for each version.
## Render the candidate formula
After tagging a release:
```bash
bash scripts/release/render-homebrew-core-formula.sh v0.52.27
```
That writes a rendered formula to `packages/homebrew-core/openhuman.rb` using the GitHub source tarball for the tag.
## Local validation
Homebrew uses the checked-out `homebrew/core` repository for local development. To test the candidate formula locally:
```bash
brew update
export HOMEBREW_NO_INSTALL_FROM_API=1
brew tap homebrew/core
cp packages/homebrew-core/openhuman.rb "$(brew --repository homebrew/core)/Formula/o/openhuman.rb"
brew audit --new --formula --strict openhuman
brew install --build-from-source openhuman
brew test openhuman
```
If you need to edit the formula in place:
```bash
brew edit openhuman
```
## Submission checklist
Before opening a PR against `Homebrew/homebrew-core`, confirm:
- The formula builds cleanly from source on supported macOS and Linux environments.
- `brew audit --new --formula --strict openhuman` passes.
- `brew test openhuman` passes.
- The project still meets Homebrew's current `Acceptable Formulae` policy for `homebrew/core`.
- The binary name and install layout are intentional. Right now the formula installs `openhuman-core` and adds an `openhuman` symlink for user ergonomics.
## Known follow-up items
- Linux dependencies may need to be tightened if Homebrew CI reports missing native libraries beyond `openssl@3`.
- If Homebrew reviewers object to the `openhuman` symlink, the upstream binary name should be renamed directly in `Cargo.toml` instead of relying on formula-level aliasing.
- If the build remains too broad for `homebrew/core`, split the CLI surface from desktop-only integrations so the formula builds with fewer native dependencies.
+7 -2
View File
@@ -17,6 +17,12 @@
brew install tinyhumansai/openhuman/openhuman
```
This is the current official Homebrew distribution channel and is backed by the
custom tap at
[tinyhumansai/homebrew-openhuman](https://github.com/tinyhumansai/homebrew-openhuman).
The repository also now tracks a `homebrew/core` source-formula candidate for a
future upstream submission; see [Homebrew Core Submission](./homebrew-core.md).
**Update:**
```bash
brew upgrade openhuman
@@ -28,8 +34,7 @@ brew uninstall openhuman
brew untap tinyhumansai/openhuman # optional: remove tap
```
Homebrew installs the binary as `openhuman`. The tap lives at
[tinyhumansai/homebrew-openhuman](https://github.com/tinyhumansai/homebrew-openhuman).
Homebrew installs the binary as `openhuman`.
---
+28
View File
@@ -0,0 +1,28 @@
class Openhuman < Formula
desc "AI-powered personal assistant for communities"
homepage "https://tinyhumans.ai/openhuman"
url "https://github.com/tinyhumansai/openhuman/archive/refs/tags/v0.52.27.tar.gz"
sha256 "e85c95db1865f325f55b6b886c1ff0296e40d5405a9e5aa03f27310d43993a52"
license "GPL-3.0-only"
head "https://github.com/tinyhumansai/openhuman.git", branch: "main"
depends_on "cmake" => :build
depends_on "pkgconf" => :build
depends_on "rust" => :build
on_linux do
depends_on "openssl@3"
end
def install
ENV["OPENSSL_NO_VENDOR"] = "1" if OS.linux?
system "cargo", "install", "--bin", "openhuman-core", *std_cargo_args
bin.install_symlink bin/"openhuman-core" => "openhuman"
end
test do
assert_match "OpenHuman core CLI", shell_output("#{bin}/openhuman --help")
assert_match "OpenHuman core CLI", shell_output("#{bin}/openhuman-core --help")
end
end
+28
View File
@@ -0,0 +1,28 @@
class Openhuman < Formula
desc "AI-powered personal assistant for communities"
homepage "https://github.com/tinyhumansai/openhuman"
url "https://github.com/tinyhumansai/openhuman/archive/refs/tags/v@VERSION@.tar.gz"
sha256 "@SOURCE_SHA256@"
license "GPL-3.0-only"
head "https://github.com/tinyhumansai/openhuman.git", branch: "main"
depends_on "cmake" => :build
depends_on "pkgconf" => :build
depends_on "rust" => :build
on_linux do
depends_on "openssl@3"
end
def install
ENV["OPENSSL_NO_VENDOR"] = "1" if OS.linux?
system "cargo", "install", "--bin", "openhuman-core", *std_cargo_args
bin.install_symlink bin/"openhuman-core" => "openhuman"
end
test do
assert_match "OpenHuman core CLI", shell_output("#{bin}/openhuman --help")
assert_match "OpenHuman core CLI", shell_output("#{bin}/openhuman-core --help")
end
end
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Render the homebrew/core candidate formula from the tagged source tarball.
#
# Usage:
# render-homebrew-core-formula.sh <tag> [output_path]
#
# Example:
# render-homebrew-core-formula.sh v0.52.27 /tmp/openhuman.rb
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
TEMPLATE_PATH="$REPO_ROOT/packages/homebrew-core/openhuman.rb.in"
TAG="${1:?Usage: render-homebrew-core-formula.sh <tag> [output_path]}"
OUT="${2:-$REPO_ROOT/packages/homebrew-core/openhuman.rb}"
VERSION="${TAG#v}"
SOURCE_URL="https://github.com/tinyhumansai/openhuman/archive/refs/tags/${TAG}.tar.gz"
TMPDIR="$(mktemp -d)"
trap 'rm -rf "$TMPDIR"' EXIT
ARCHIVE_PATH="$TMPDIR/${TAG}.tar.gz"
echo "[homebrew-core] Downloading source tarball: $SOURCE_URL"
curl -fsSL "$SOURCE_URL" -o "$ARCHIVE_PATH"
SOURCE_SHA256="$(openssl dgst -sha256 -r "$ARCHIVE_PATH" | awk '{print $1}')"
echo "[homebrew-core] Source sha256: $SOURCE_SHA256"
mkdir -p "$(dirname "$OUT")"
sed \
-e "s/@VERSION@/${VERSION}/g" \
-e "s/@SOURCE_SHA256@/${SOURCE_SHA256}/g" \
"$TEMPLATE_PATH" > "$OUT"
echo "[homebrew-core] Rendered formula -> $OUT"