File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ class Elf2uf2Rs < Formula
2
+ desc "Convert ELF files to UF2 for USB Flashing Bootloaders"
3
+ homepage "https://github.com/JoNil/elf2uf2-rs"
4
+ url "https://github.com/JoNil/elf2uf2-rs/archive/refs/tags/2.1.1.tar.gz"
5
+ sha256 "c6845f696112193bbe6517ab0c9b9fc85dff1083911557212412e07c506ccd7c"
6
+ license "0BSD"
7
+
8
+ depends_on "rust" => :build
9
+
10
+ on_linux do
11
+ depends_on "pkgconf" => :build
12
+ depends_on "systemd" # for libudev
13
+ end
14
+
15
+ def install
16
+ system "cargo" , "install" , *std_cargo_args
17
+ ( pkgshare /"examples" ) . install Dir . glob ( "*.elf" )
18
+ ( pkgshare /"examples" ) . install Dir . glob ( "*.uf2" )
19
+ end
20
+
21
+ test do
22
+ system bin /"elf2uf2-rs" , pkgshare /"examples" /"hello_usb.elf" , "converted.uf2"
23
+ assert compare_file pkgshare /"examples" /"hello_usb.uf2" , testpath /"converted.uf2"
24
+ end
25
+ end
You can’t perform that action at this time.
0 commit comments