diff --git a/.github/autobump.txt b/.github/autobump.txt index fa0c8907530c..f52ddc3b9018 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -511,6 +511,7 @@ cyclonedx-gomod cyclonedx-python cycode cyctl +cyme cypher-shell cyrus-sasl cython diff --git a/Formula/c/cyme.rb b/Formula/c/cyme.rb new file mode 100644 index 000000000000..52c5eeb14734 --- /dev/null +++ b/Formula/c/cyme.rb @@ -0,0 +1,27 @@ +class Cyme < Formula + desc "List system USB buses and devices" + homepage "https://github.com/tuna-f1sh/cyme" + url "https://github.com/tuna-f1sh/cyme/archive/refs/tags/v1.7.0.tar.gz" + sha256 "63ca7c5f473cbefb1fd07ba9b4f9693268d80560a778a001d82fab68bbd1552a" + license "GPL-3.0-or-later" + head "https://github.com/tuna-f1sh/cyme.git", branch: "main" + + depends_on "rust" => :build + depends_on "libusb" + + def install + system "cargo", "install", *std_cargo_args + man1.install "doc/cyme.1" + bash_completion.install "doc/cyme.bash" + zsh_completion.install "doc/_cyme" + fish_completion.install "doc/cyme.fish" + end + + test do + # Test fails on headless CI + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + output = JSON.parse(shell_output("#{bin}/cyme --tree --json")) + assert_predicate output["buses"], :present? + end +end