Skip to content

Instantly share code, notes, and snippets.

@ddustin
Created October 15, 2022 20:40
Show Gist options
  • Save ddustin/08be559ec3e52b58c212a309d1b2546c to your computer and use it in GitHub Desktop.
Save ddustin/08be559ec3e52b58c212a309d1b2546c to your computer and use it in GitHub Desktop.
class CoreLightning < Formula
desc "Core Lightning — Lightning Network implementation focusing on spec compliance and performance"
homepage "https://github.com/ElementsProject/lightning"
url "https://github.com/ddustin/lightning.git",
using: :git,
tag: "99.99"
license "MIT"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "python@3.7" => :build
depends_on "gmp" => :build
depends_on "gnu-sed" => :build
depends_on "gettext" => :build
depends_on "libsodium" => :build
depends_on "poetry" => :build
def install
system "poetry", "install"
system "./configure", "--prefix=#{prefix}"
system "poetry", "run", "make", "install"
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! For Homebrew/homebrew-core
# this will need to be a test that verifies the functionality of the
# software. Run the test with `brew test lightningd`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "#{bin}/lightning-cli", "--version"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment