# Generated by bincast - https://github.com/benelser/bincast
# Homebrew formula for delite-core
class DeliteCore < Formula
  desc "The sqlite of durable agent execution Ã¢ÂÂ crash-recoverable AI agents with exactly-once semantics. Zero dependencies."
  homepage "https://github.com/benelser/durable"
  license "MIT"

  on_macos do
    if Hardware::CPU.arm?
      url "https://github.com/benelser/durable/releases/download/v#{version}/delite-core-aarch64-apple-darwin.tar.gz"
      sha256 "PLACEHOLDER"
    end
    if Hardware::CPU.intel?
      url "https://github.com/benelser/durable/releases/download/v#{version}/delite-core-x86_64-apple-darwin.tar.gz"
      sha256 "PLACEHOLDER"
    end
  end

  on_linux do
    if Hardware::CPU.arm?
      url "https://github.com/benelser/durable/releases/download/v#{version}/delite-core-aarch64-unknown-linux-gnu.tar.gz"
      sha256 "PLACEHOLDER"
    end
    if Hardware::CPU.intel?
      url "https://github.com/benelser/durable/releases/download/v#{version}/delite-core-x86_64-unknown-linux-gnu.tar.gz"
      sha256 "PLACEHOLDER"
    end
  end

  def install
    bin.install "delite"
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/delite --version")
  end
end
