diff --git a/Formula/s/screenpipe.rb b/Formula/s/screenpipe.rb new file mode 100644 index 000000000000..7a9c983ee713 --- /dev/null +++ b/Formula/s/screenpipe.rb @@ -0,0 +1,34 @@ +class Screenpipe < Formula + desc "Library to build personalized AI powered by what you've seen, said, or heard" + homepage "https://github.com/mediar-ai/screenpipe" + url "https://github.com/mediar-ai/screenpipe/archive/refs/tags/v0.1.98.tar.gz" + sha256 "cb3c8039ecb60d35bacd2b9673db112f907b4a1d3d7c32f49a5e77c0274268ad" + license "MIT" + + depends_on "rust" => :build + depends_on "ffmpeg" + + on_macos do + def install + ENV["PKG_CONFIG_PATH"] = "/usr/local/opt/ffmpeg/lib/pkgconfig:#{ENV["PKG_CONFIG_PATH"]}" if Hardware::CPU.intel? + ENV["PKG_CONFIG_ALLOW_CROSS"] = "1" if Hardware::CPU.intel? + + target_arch = Hardware::CPU.arm? ? "aarch64-apple-darwin" : "x86_64-apple-darwin" + system "cargo", "build", "--release", "--features", "metal,pipes", "--target", target_arch + bin.install "target/#{target_arch}/release/screenpipe" + end + + def caveats + <<~EOS + Bun is not available on Homebrew + To install Bun, please visit the official website: + https://bun.sh + Follow the instructions there to install Bun on your system. + EOS + end + end + + test do + system "#{bin}/screenpipe", "-h" + end +end