-
Notifications
You must be signed in to change notification settings - Fork 0
/
pact.rb
45 lines (38 loc) · 1.28 KB
/
pact.rb
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
class Pact < Formula
desc "Interpreter for the Pact smart contract language"
homepage "https://github.com/kadena-io/pact"
on_macos do
depends_on "z3"
depends_on "openssl@3"
on_intel do
url "https://github.com/kadena-io/pact/releases/download/v4.11.0/pact-4.11.0-osx.tar.gz"
sha256 "8d3e194a13593cdf33dcd314cb0ca2452302106bfe238624f8e9761c9a4e1ca2"
end
on_arm do
url "https://github.com/kadena-io/pact/releases/download/v4.13.1/pact-4.13.1-aarch64-osx.tar.gz"
sha256 "21c65c8391b3402ef329d275c00ee14d4bd7d1b690757ead2d8484cadd898a18"
end
head do
on_arm do
url "https://github.com/kadena-io/pact-5/releases/download/nightly/pact-nightly-darwin-aarch64.tar.gz"
sha256 "fd52aa146cda4cc6323355e66955f8e1a2cbcc1de3653f92af06d94a6b4fefb8"
end
end
def install
if Hardware::CPU.intel?
opoo "Warning: On intel machines, we fallback to the Pact 4.11 release."
end
bin.install "pact"
end
def caveats
<<~EOS
The head version (Pact 5 development build) is currently only available for ARM-based Macs.
The Intel Macs will use the 4.11 Release.
EOS
end
test do
system "#{bin}/z3", "-version"
system "#{bin}/pact", "--version"
end
end
end