27 lines
715 B
Ruby
27 lines
715 B
Ruby
class Clojure < Formula
|
|
desc "The Clojure Programming Language"
|
|
homepage "https://clojure.org"
|
|
url "https://download.clojure.org/install/clojure-tools-1.10.1.590.tar.gz"
|
|
sha256 "6786aa8b1406cf279609f8a9e84fa554fe7fb6a35e1057c31cdb72acfbeca8a3"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "openjdk"
|
|
depends_on "rlwrap"
|
|
|
|
uses_from_macos "ruby" => :build
|
|
|
|
def install
|
|
system "./install.sh", prefix
|
|
bin.env_script_all_files libexec/"bin", JAVA_HOME: "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}"
|
|
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
|