From ee11057ee49a22d0ce4fd64e42961e6924695aac Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Fri, 8 Sep 2017 08:38:22 -0500 Subject: [PATCH] clojure 1.8.0.132 (new formula) (#17154) --- Formula/clojure.rb | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Formula/clojure.rb diff --git a/Formula/clojure.rb b/Formula/clojure.rb new file mode 100644 index 0000000000..fb40a77f6a --- /dev/null +++ b/Formula/clojure.rb @@ -0,0 +1,34 @@ +class Clojure < Formula + desc "The Clojure Programming Language" + homepage "https://clojure.org" + url "https://download.clojure.org/install/brew/clojure-scripts-1.8.0.132.tar.gz" + sha256 "9e544c830977aa796c750737f2fcee5e8f4be08c081493b9851c4bbb07c7e570" + + devel do + url "https://download.clojure.org/install/brew/clojure-scripts-1.9.0-alpha19.171.tar.gz" + sha256 "17241651fafa426c67a79099ea422645c0bc6ad5fc026bc183762518ec9bc9b5" + version "1.9.0-alpha19.171" + end + + bottle :unneeded + + depends_on :java => "1.7+" + depends_on "rlwrap" + + def install + system "./install.sh", prefix + end + + def caveats; <<-EOS.undent + Run `clojure -h` to see Clojure runner options. + Run `clj` for an interactive Clojure REPL. + EOS + end + + test do + 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