Skip to content

Commit 53ed1a0

Browse files
AkihiroSudaBrewTestBot
authored andcommitted
socket_vmnet 1.1.0 (new formula)
Alternative to Homebrew/homebrew-cask PR 136271 Closes #116501. Signed-off-by: Akihiro Suda <[email protected]> Signed-off-by: Patrick Linnane <[email protected]> Signed-off-by: BrewTestBot <[email protected]>
1 parent 4dbfa87 commit 53ed1a0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Formula/socket_vmnet.rb

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
class SocketVmnet < Formula
2+
desc "Daemon to provide vmnet.framework support for rootless QEMU"
3+
homepage "https://github.com/lima-vm/socket_vmnet"
4+
url "https://github.com/lima-vm/socket_vmnet/archive/refs/tags/v1.1.0.tar.gz"
5+
sha256 "da85362518c4ccfef3587240d380d52d7c7621c4567f1d9a476e1c17c5a7563b"
6+
license "Apache-2.0"
7+
head "https://github.com/lima-vm/socket_vmnet.git", branch: "master"
8+
9+
keg_only "#{HOMEBREW_PREFIX}/bin is often writable by a non-admin user"
10+
11+
depends_on :macos
12+
13+
def install
14+
# make: skip "install.launchd"
15+
system "make", "install.bin", "install.doc", "VERSION=#{version}", "PREFIX=#{prefix}"
16+
end
17+
18+
def caveats
19+
<<~EOS
20+
To install an optional launchd service, run the following command (sudo is necessary):
21+
sudo brew services start socket_vmnet
22+
EOS
23+
end
24+
25+
service do
26+
run [opt_bin/"socket_vmnet", "--vmnet-gateway=192.168.105.1", var/"run/socket_vmnet"]
27+
run_type :immediate
28+
error_log_path var/"run/socket_vmnet.stderr"
29+
log_path var/"run/socket_vmnet.stdout"
30+
require_root true
31+
end
32+
33+
test do
34+
assert_match "bind: Address already in use", shell_output("#{opt_bin}/socket_vmnet /dev/null 2>&1", 1)
35+
end
36+
end

0 commit comments

Comments
 (0)