Skip to content

Commit e5d8552

Browse files
authored
Merge pull request #224206 from AkihiroSuda/lima-1.1.0
lima 1.1.1 lima-additional-guestagents 1.1.1 (new formula)
2 parents 86c30fb + d654c5a commit e5d8552

File tree

2 files changed

+61
-11
lines changed

2 files changed

+61
-11
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
class LimaAdditionalGuestagents < Formula
2+
desc "Additional guest agents for Lima"
3+
homepage "https://lima-vm.io/"
4+
url "https://github.com/lima-vm/lima/archive/refs/tags/v1.1.1.tar.gz"
5+
sha256 "82577e2223dc0ba06ea5aac539ab836e1724cdd0440d800e47c8b7d0f23d7de5"
6+
license "Apache-2.0"
7+
head "https://github.com/lima-vm/lima.git", branch: "master"
8+
9+
bottle do
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e21b3e7d70b997b1dd6e7d996d903edffb6055339a1b6c15911f5282efd1cea"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "fd6d9cda49a969422b199c4f40f8e30a1fc5d725a03ae4004c694dfcd3826076"
12+
sha256 cellar: :any_skip_relocation, arm64_ventura: "90316c2e8fd2027a848b40fe642b3d81acb20b87c8b169920c4b223ecb515d1a"
13+
sha256 cellar: :any_skip_relocation, sonoma: "de1807b8111dd71f1eb779fbad785beecef840216c9506ccdf9923f62980b61c"
14+
sha256 cellar: :any_skip_relocation, ventura: "f8ff74c221f986226128c968eb2b1fe73c3ed16a86215d09ebaf44520a5ad0ba"
15+
sha256 cellar: :any_skip_relocation, arm64_linux: "c029ca0dc5d56d6606c1c53b81493ae3cec81d09205f9469538a6bef8843023e"
16+
sha256 cellar: :any_skip_relocation, x86_64_linux: "bb471e21416e4c445e30e96209e965677ebc99fbc9809baad2e6be3dbb5f939c"
17+
end
18+
19+
depends_on "go" => :build
20+
depends_on "lima"
21+
depends_on "qemu"
22+
23+
def install
24+
if build.head?
25+
system "make", "additional-guestagents"
26+
else
27+
# VERSION has to be explicitly specified when building from tar.gz, as it does not contain git tags
28+
system "make", "additional-guestagents", "VERSION=#{version}"
29+
end
30+
31+
bin.install Dir["_output/bin/*"]
32+
share.install Dir["_output/share/*"]
33+
end
34+
35+
test do
36+
info = JSON.parse shell_output("limactl info")
37+
assert_includes info["guestAgents"], "riscv64"
38+
end
39+
end

Formula/l/lima.rb

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
class Lima < Formula
22
desc "Linux virtual machines"
33
homepage "https://lima-vm.io/"
4-
url "https://github.com/lima-vm/lima/archive/refs/tags/v1.0.7.tar.gz"
5-
sha256 "90f682e96a370c342c3b16deb1858f37ee28ce88e888e1d6b2634ba24228fdbb"
4+
url "https://github.com/lima-vm/lima/archive/refs/tags/v1.1.1.tar.gz"
5+
sha256 "82577e2223dc0ba06ea5aac539ab836e1724cdd0440d800e47c8b7d0f23d7de5"
66
license "Apache-2.0"
77
head "https://github.com/lima-vm/lima.git", branch: "master"
88

99
bottle do
10-
sha256 cellar: :any_skip_relocation, arm64_sequoia: "7a99cf98dbfdbd0b3ad62f4d84640c5cfcef5242cbaa4b8d043c1d12c41809b0"
11-
sha256 cellar: :any_skip_relocation, arm64_sonoma: "fd766f555146d659f9841554a8270e704156b48ae3502c584b0e1f4af076688a"
12-
sha256 cellar: :any_skip_relocation, arm64_ventura: "69ef12a79d1a2057073cdb7e659d6f903fc02cb816f49c856e032df853b549fa"
13-
sha256 cellar: :any_skip_relocation, sonoma: "bfabc4017b8412a0d6d69445c2a398a387af58c5b5c232542d07689d00e1c345"
14-
sha256 cellar: :any_skip_relocation, ventura: "2f04d37e54c94d413434f5e0ac74f52d7c2714df72f12198e86545b7aa71310d"
15-
sha256 cellar: :any_skip_relocation, arm64_linux: "b6385e14aa7c7b095f780d3143121353dd63383cac97f050e0b45e86ea7975ba"
16-
sha256 cellar: :any_skip_relocation, x86_64_linux: "7dee156f0206d0ddb735d4da04a1eeade34799dd9b5e37db32da404a14fb49cf"
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "9cd1a319ae657c32218da384ab05a8de1af594b5b298687ab5f0082a4bae570f"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef3da306aebcec4125f01376855bc422e629375914866217206f4b84cb05f17c"
12+
sha256 cellar: :any_skip_relocation, arm64_ventura: "ae4f6f583bcfac4cd65d0a5a435f029fcad07c912001b34b69c4b86989f8a1a0"
13+
sha256 cellar: :any_skip_relocation, sonoma: "c45416f1811568ee8800d55440e281a223b06bdc43783eddf361d118213b4b4c"
14+
sha256 cellar: :any_skip_relocation, ventura: "f41f7371692a2d18cb3068fb49d63e00c26a24cd7d99458eab6678d972bccbdd"
15+
sha256 cellar: :any_skip_relocation, arm64_linux: "3e81a7100ebccbd85fda8c6de1908cb8930cd5c51443532c167b90b4325f09af"
16+
sha256 cellar: :any_skip_relocation, x86_64_linux: "f62f734e16c2d4bbe15acb813acffba55c25fa1e378d4c3763c7c184470fcd50"
1717
end
1818

1919
depends_on "go" => :build
@@ -23,11 +23,14 @@ class Lima < Formula
2323
end
2424

2525
def install
26+
# make (default): build everything
27+
# make native: build core + native guest agent
28+
# make additional-guestagents: build non-native guest agents
2629
if build.head?
27-
system "make"
30+
system "make", "native"
2831
else
2932
# VERSION has to be explicitly specified when building from tar.gz, as it does not contain git tags
30-
system "make", "VERSION=#{version}"
33+
system "make", "native", "VERSION=#{version}"
3134
end
3235

3336
bin.install Dir["_output/bin/*"]
@@ -37,6 +40,14 @@ def install
3740
generate_completions_from_executable(bin/"limactl", "completion")
3841
end
3942

43+
def caveats
44+
# since lima 1.1
45+
<<~EOS
46+
The guest agents for non-native architectures are now provided in a separate formula:
47+
brew install lima-additional-guestagents
48+
EOS
49+
end
50+
4051
test do
4152
info = JSON.parse shell_output("#{bin}/limactl info")
4253
# Verify that the VM drivers are compiled in

0 commit comments

Comments
 (0)