From 77084c31a39f82d428a89515fe1778da475a5369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?fn=20=E2=8C=83=20=E2=8C=A5?= <70830482+FnControlOption@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:58:22 -0700 Subject: [PATCH] cyme 1.7.0 (new formula) --- .github/autobump.txt | 1 + Formula/c/cyme.rb | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 Formula/c/cyme.rb 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