Created
February 22, 2020 14:37
-
-
Save littleli/d4b2b642f84a6ffed7435d405cb5ba1c to your computer and use it in GitHub Desktop.
Clojure homebrew formula
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Clojure < Formula | |
desc "The Clojure Programming Language" | |
homepage "https://clojure.org" | |
url "https://download.clojure.org/install/clojure-tools-1.10.1.510.tar.gz" | |
sha256 "c6e003f612bdd7f9a9baa6d86deafb2d51b411310077c83c9ed13bc649c13b18" | |
revision 1 | |
bottle :unneeded | |
depends_on "rlwrap" | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment