From f2a78cb52d909fbd34ada2cfc0b9008a14e88d6e Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Tue, 25 Jun 2019 08:59:01 +0800 Subject: [PATCH] miniserve 0.5.0 Closes #41304. Signed-off-by: Thierry Moisan --- Formula/miniserve.rb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Formula/miniserve.rb b/Formula/miniserve.rb index cc88eba324..820d47fb69 100644 --- a/Formula/miniserve.rb +++ b/Formula/miniserve.rb @@ -1,8 +1,8 @@ class Miniserve < Formula desc "High performance static file server" homepage "https://github.com/svenstaro/miniserve" - url "https://github.com/svenstaro/miniserve/archive/v0.3.0.tar.gz" - sha256 "80ee5d661730ddad14671f961b560467f3b3a9f0544b9b11dec65098eb4a1f7e" + url "https://github.com/svenstaro/miniserve/archive/v0.5.0.tar.gz" + sha256 "5b7c91bdf35e1a17ca006efa0354712301886c5c50952a2162401aef77faced0" bottle do cellar :any_skip_relocation @@ -11,9 +11,19 @@ class Miniserve < Formula sha256 "a00b82cfce9fecd067b62ec3135a0e9cc59d3133f97ed3c0e7b815e4921c32d0" => :sierra end - depends_on "rust" => :build + depends_on "openssl" + + # Miniserve requires a known-good Rust nightly release to use. + resource "rust-nightly" do + url "https://static.rust-lang.org/dist/2019-08-24/rust-nightly-x86_64-apple-darwin.tar.xz" + sha256 "104ddea51b758f4962960097e9e0f3cabf2c671ec3148bc745344431bb93605d" + end def install + resource("rust-nightly").stage do + system "./install.sh", "--prefix=#{buildpath}/rust-nightly" + ENV.prepend_path "PATH", "#{buildpath}/rust-nightly/bin" + end system "cargo", "install", "--root", prefix, "--path", "." end @@ -25,7 +35,7 @@ class Miniserve < Formula server.close pid = fork do - exec "#{bin}/miniserve", "#{bin}/miniserve", "--if", "127.0.0.1", "--port", port.to_s + exec "#{bin}/miniserve", "#{bin}/miniserve", "-i", "127.0.0.1", "--port", port.to_s end sleep 2