cpuid 2.2.2 (new formula)

Closes #118191.

Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Patrick Linnane <patrick@linnane.io>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Rui Chen 2022-12-14 18:42:01 -05:00 committed by BrewTestBot
parent 3534b6b01b
commit d60085ac66
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 21 additions and 0 deletions

21
Formula/cpuid.rb Normal file
View File

@ -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