Skip to content

Commit 3a3d333

Browse files
committed
patchpal 0.4.0: (new formula)
Initial homebrew packaging. This is software developed by some folks at Red Hat, looking to improve the patch backporting experience, even for those using macOS. It's a rust-based frontend that can be run entirely without the backend, but can also hook into a python-based backend AI server that helps provide AI assistance with backporting patches from a development branch to an older stable maintenance branch, such as, say, from the upstream Linux kernel branch to an old Red Hat Enterprise Linux kernel branch. Signed-off-by: Jarod Wilson <[email protected]>
1 parent cdac3d3 commit 3a3d333

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

Formula/p/patchpal.rb

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
class Patchpal < Formula
2+
desc "AI Assisted Patch Backporting Tool Frontend"
3+
homepage "https://gitlab.com/patchpal-ai/patchpal-gui"
4+
url "https://gitlab.com/patchpal-ai/patchpal-gui/-/archive/v0.4.0/patchpal-gui-v0.4.0.tar.bz2"
5+
sha256 "69e949af1c458879ffbc7198fffc16f7fae288825dc012045224d108be9be339"
6+
license "Apache-2.0"
7+
8+
depends_on "pkgconf" => :build
9+
depends_on "rust" => :build
10+
11+
depends_on "gawk" => :test
12+
13+
depends_on "cairo"
14+
depends_on "gdk-pixbuf"
15+
depends_on "glib"
16+
depends_on "graphene"
17+
depends_on "gtk4"
18+
depends_on "llvm"
19+
depends_on "pango"
20+
21+
def install
22+
ENV.prepend_path "PATH", Formula["gawk"].bin if OS.mac?
23+
inreplace "tests/run.sh", "readlink -e", "echo"
24+
inreplace "tests/run.sh", "target/release/patchpal", "bin/patchpal"
25+
system "cargo", "install", *std_cargo_args
26+
prefix.install "tests"
27+
end
28+
29+
test do
30+
assert_equal "Usage:\n patchpal [OPTION…] COMMIT\n", shell_output("#{bin}/patchpal --help | head -n 2")
31+
with_env(GIT_COMMITTER_NAME: nil, GIT_COMMITTER_EMAIL: nil) do
32+
output = shell_output("#{prefix}/tests/run.sh")
33+
assert_match <<~EOS, output
34+
ok 1 test_add_copied.sh
35+
ok 2 test_change_renamed1.sh
36+
ok 3 test_change_renamed2.sh
37+
ok 4 test_change_renamed3.sh
38+
ok 5 test_change_renamed4.sh
39+
ok 6 test_clean_add.sh
40+
ok 7 test_clean_change.sh
41+
ok 8 test_clean_remove.sh
42+
ok 9 test_clean_rename.sh
43+
ok 10 test_rename_renamed1.sh
44+
ok 11 test_rename_renamed2.sh
45+
1..11
46+
EOS
47+
end
48+
end
49+
end

0 commit comments

Comments
 (0)