From a26215cd620deb3548647644d34ad2b63ed1e14f Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Thu, 25 Sep 2014 12:59:13 -0700 Subject: [PATCH] Add Rust and Cargo nightlies --- cargo-nightly.rb | 16 ++++++++++++++++ rust-nightly.rb | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 cargo-nightly.rb create mode 100644 rust-nightly.rb diff --git a/cargo-nightly.rb b/cargo-nightly.rb new file mode 100644 index 0000000..01eccff --- /dev/null +++ b/cargo-nightly.rb @@ -0,0 +1,16 @@ +require 'formula' + +class CargoNightly < Formula + homepage 'http://crates.io/' + head 'http://static.rust-lang.org/cargo-dist/cargo-nightly-x86_64-apple-darwin.tar.gz' + + # depends_on 'rust-nightly' + + def install + system "./install.sh", "--prefix=#{prefix}" + end + + test do + system "#{bin}/cargo" + end +end diff --git a/rust-nightly.rb b/rust-nightly.rb new file mode 100644 index 0000000..02a5bf6 --- /dev/null +++ b/rust-nightly.rb @@ -0,0 +1,17 @@ +require 'formula' + +class RustNightly < Formula + homepage 'http://www.rust-lang.org/' + head 'http://static.rust-lang.org/dist/rust-nightly-x86_64-apple-darwin.tar.gz' + + conflicts_with 'rust', :because => 'same' + + def install + system "./install.sh", "--prefix=#{prefix}" + end + + test do + system "#{bin}/rustc" + system "#{bin}/rustdoc", "-h" + end +end