Skip to content

Commit 8b08379

Browse files
botantonychenrui333
andcommitted
yek 0.21.0 (new formula)
Signed-off-by: botantony <[email protected]> Update Formula/y/yek.rb Co-authored-by: Rui Chen <[email protected]>
1 parent f007446 commit 8b08379

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Formula/y/yek.rb

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
class Yek < Formula
2+
desc "Fast Rust based tool to serialize text-based files for LLM consumption"
3+
homepage "https://github.com/bodo-run/yek"
4+
url "https://github.com/bodo-run/yek/archive/refs/tags/v0.21.0.tar.gz"
5+
sha256 "2c0e863e0f49f690977910498a1b8dd151c625bf04b88a7d6ff20553590b6ccf"
6+
license "MIT"
7+
head "https://github.com/bodo-run/yek.git", branch: "main"
8+
9+
livecheck do
10+
url :stable
11+
regex(/^v?(\d+(?:\.\d+)+)$/i)
12+
end
13+
14+
depends_on "pkgconf" => :build
15+
depends_on "rust" => :build
16+
17+
depends_on "openssl@3"
18+
uses_from_macos "zlib"
19+
20+
def install
21+
ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
22+
ENV["OPENSSL_NO_VENDOR"] = "1"
23+
24+
system "cargo", "install", *std_cargo_args
25+
end
26+
27+
test do
28+
assert_match version.to_s, shell_output("#{bin}/yek --version")
29+
30+
(testpath/"main.c").write <<~C
31+
#include <stdio.h>
32+
#include <stdlib.h>
33+
34+
int main(void) {
35+
printf("%s\n", "Hello, world!");
36+
return EXIT_SUCCESS;
37+
}
38+
C
39+
expected_file = shell_output("#{bin}/yek --output-dir #{testpath}")
40+
assert_match ">>>> main.c", expected_file
41+
end
42+
end

0 commit comments

Comments
 (0)