Skip to content

Commit

Permalink
fixup! feat: cartesi-machine formula
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Sep 6, 2024
1 parent 2e66fe3 commit dee1a6f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Formula/cartesi-machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit dee1a6f

Please sign in to comment.