miniserve 0.5.0

Closes #41304.

Signed-off-by: Thierry Moisan <thierry.moisan@gmail.com>
This commit is contained in:
Rui Chen 2019-06-25 08:59:01 +08:00 committed by Thierry Moisan
parent 3a535d1d56
commit f2a78cb52d
No known key found for this signature in database
GPG key ID: A9A4CB593D38CDD0

View file

@ -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