/ fetchx / homebrew / fetchx.rb
Swadhin Biswas feat: add temperature detection and Homebrew formula · 3/7/2026
320ac67
26 lines · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class Fetchx < Formula
  desc "A blazing-fast, feature-rich system information tool written in Rust"
  homepage "https://github.com/swadhinbiswas/fetchx"
  url "https://github.com/swadhinbiswas/fetchx/releases/download/v0.2.0/fetchx-0.2.0-x86_64-apple-darwin.tar.gz"
  version "0.2.0"
  sha256 "REPLACE_WITH_ACTUAL_SHA256"
  license "MIT"
  head "https://github.com/swadhinbiswas/fetchx.git"

  depends_on "rust" => :build

  def install
    # Build from source if using head
    if build.head?
      system "cargo", "build", "--release", "--locked"
      bin.install "target/release/fetchx"
    else
      bin.install "fetchx"
    end
  end

  test do
    system "#{bin}/fetchx", "--version"
  end
end