From dee1a6f1c750a8cb27f1d2c0b44adcd148a789c2 Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Thu, 5 Sep 2024 23:08:53 -0400 Subject: [PATCH] fixup! feat: cartesi-machine formula --- Formula/cartesi-machine.rb | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Formula/cartesi-machine.rb b/Formula/cartesi-machine.rb index 270bd92..9748c68 100644 --- a/Formula/cartesi-machine.rb +++ b/Formula/cartesi-machine.rb @@ -7,11 +7,19 @@ class CartesiMachine < Formula version "0.18.1" depends_on "pkg-config" => :build - depends_on "wget" => :build depends_on "boost" => :build depends_on "libslirp" => :build depends_on "lua" => :build - depends_on "openssl" => :build + + resource "linux" do + url "https://github.com/cartesi/image-kernel/releases/download/v0.20.0/linux-6.5.13-ctsi-1-v0.20.0.bin" + sha256 "65dd100ff6204346ac2f50f772721358b5c1451450ceb39a154542ee27b4c947" + end + + resource "rootfs" do + url "https://github.com/cartesi/image-rootfs/releases/download/v0.19.0/rootfs-v0.19.0.ext2" + sha256 "a3a9aa5c2ab83093585587da4e4b8e4ef620528b7859b2a9337e40bf3e564dd4" + end patch :p0 do url "https://github.com/cartesi/machine-emulator/releases/download/v0.18.1/add-generated-files.diff" @@ -21,6 +29,12 @@ class CartesiMachine < Formula def install system "make", "BREW_PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}" + + (pkgshare/"images").install resource("linux") + (pkgshare/"images").install resource("rootfs") + + (pkgshare/"images").install_symlink "linux-6.5.13-ctsi-1-v0.20.0.bin" => "linux.bin" + (pkgshare/"images").install_symlink "rootfs-v0.19.0.ext2" => "rootfs.ext2" end test do