36 lines
1.0 KiB
Ruby
36 lines
1.0 KiB
Ruby
class Clojure < Formula
|
|
desc "Dynamic, general-purpose programming language"
|
|
homepage "https://clojure.org"
|
|
url "https://download.clojure.org/install/clojure-tools-1.10.3.1075.tar.gz"
|
|
sha256 "e6e26dafabb3ea6ae4a057f352651beafcb91f8b352da83708d0ac1b0b1067d4"
|
|
license "EPL-1.0"
|
|
version_scheme 1
|
|
|
|
livecheck do
|
|
url "https://raw.githubusercontent.com/clojure/homebrew-tools/master/Formula/clojure.rb"
|
|
regex(/url ".*?clojure-tools-v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "c629f1c26a6ca160bb339826cb48f32c47b2951e7388ec3470e2f2c661a6f59a"
|
|
end
|
|
|
|
depends_on "openjdk"
|
|
depends_on "rlwrap"
|
|
|
|
uses_from_macos "ruby" => :build
|
|
|
|
def install
|
|
system "./install.sh", prefix
|
|
bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env
|
|
end
|
|
|
|
test do
|
|
ENV["TERM"] = "xterm"
|
|
system("#{bin}/clj", "-e", "nil")
|
|
%w[clojure clj].each do |clj|
|
|
assert_equal "2", shell_output("#{bin}/#{clj} -e \"(+ 1 1)\"").strip
|
|
end
|
|
end
|
|
end
|