Skip to content

Commit

Permalink
cpuid 2.2.2 (new formula)
Browse files Browse the repository at this point in the history
Closes #118191.

Signed-off-by: Rui Chen <[email protected]>
Signed-off-by: Patrick Linnane <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
  • Loading branch information
chenrui333 authored and BrewTestBot committed Dec 15, 2022
1 parent 3534b6b commit d60085a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Formula/cpuid.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class Cpuid < Formula
desc "CPU feature identification for Go"
homepage "https://github.com/klauspost/cpuid"
url "https://github.com/klauspost/cpuid/archive/refs/tags/v2.2.2.tar.gz"
sha256 "bd65882ac77c56cc4a8af5c7c72aa10818ae0b53b9a6928c6d02294e23798344"
license "MIT"
head "https://github.com/klauspost/cpuid.git", branch: "master"

depends_on "go" => :build

def install
system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cpuid"
end

test do
json = shell_output("#{bin}/cpuid -json")
assert_match "BrandName", json
assert_match "VendorID", json
assert_match "VendorString", json
end
end

0 comments on commit d60085a

Please sign in to comment.