homebrew-core/Formula/streamlink.rb

100 lines
4.6 KiB
Ruby

class Streamlink < Formula
include Language::Python::Virtualenv
desc "CLI for extracting streams from various websites to a video player"
homepage "https://streamlink.github.io/"
url "https://files.pythonhosted.org/packages/aa/43/650e13e9db710bee282adf58cca01878ca66aa1213d59ced5b7bf76163f1/streamlink-3.0.3.tar.gz"
sha256 "a042bda7a3aea864a6d897607e727e374b09b51abac02a15086714d0634430b2"
license "BSD-2-Clause"
head "https://github.com/streamlink/streamlink.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, arm64_monterey: "6547aa4d4e68e0df594f7ea3f0708280e2cfda25955d0f5da90e62fb17469897"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "994ff304e5fa169c3c027479010910885b736400ee55c7d3e13d683c3b2af449"
sha256 cellar: :any_skip_relocation, monterey: "4f0fbb742461e66892b3e0b290540fa72a43ca6b00741394a305b5fd32ccefc0"
sha256 cellar: :any_skip_relocation, big_sur: "d7546e9707dc7857de742496663d7b657a2207b294e373aef678ad91ff6d1da8"
sha256 cellar: :any_skip_relocation, catalina: "5996694883ba88637c03c91d0d4fc83d4706b331d3edcef3494b53fe8d721b71"
sha256 cellar: :any_skip_relocation, x86_64_linux: "bac7c0cbdd7ac22971bb8364abfb5542acfba49b5c2cd90da8deef0ca8da5395"
end
depends_on "python@3.10"
uses_from_macos "libffi"
uses_from_macos "libxml2"
uses_from_macos "libxslt"
on_linux do
depends_on "pkg-config" => :build
end
resource "certifi" do
url "https://files.pythonhosted.org/packages/6c/ae/d26450834f0acc9e3d1f74508da6df1551ceab6c2ce0766a593362d6d57f/certifi-2021.10.8.tar.gz"
sha256 "78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/2f/39/5d8ff929409113e9ff402e405a7c7880ab1fa6f118a4ab72443976a01711/charset-normalizer-2.0.8.tar.gz"
sha256 "735e240d9a8506778cd7a453d97e817e536bb1fc29f4f6961ce297b9c7a917b0"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/62/08/e3fc7c8161090f742f504f40b1bccbfc544d4a4e09eb774bf40aafce5436/idna-3.3.tar.gz"
sha256 "9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"
end
resource "isodate" do
url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz"
sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8"
end
resource "lxml" do
url "https://files.pythonhosted.org/packages/fe/4c/a4dbb4e389f75e69dbfb623462dfe0d0e652107a95481d40084830d29b37/lxml-4.6.4.tar.gz"
sha256 "daf9bd1fee31f1c7a5928b3e1059e09a8d683ea58fb3ffc773b6c88cb8d1399c"
end
resource "pycountry" do
url "https://files.pythonhosted.org/packages/76/73/6f1a412f14f68c273feea29a6ea9b9f1e268177d32e0e69ad6790d306312/pycountry-20.7.3.tar.gz"
sha256 "81084a53d3454344c0292deebc20fcd0a1488c136d4900312cbd465cf552cb42"
end
resource "pycryptodome" do
url "https://files.pythonhosted.org/packages/64/ab/f2b4059ddf59bffbdbb4bdb60a6729c6c1de5eea1ef186d5a633ae12db3b/pycryptodome-3.11.0.tar.gz"
sha256 "428096bbf7a77e207f418dfd4d7c284df8ade81d2dc80f010e92753a3e406ad0"
end
resource "PySocks" do
url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz"
sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/e7/01/3569e0b535fb2e4a6c384bdbed00c55b9d78b5084e0fb7f4d0bf523d7670/requests-2.26.0.tar.gz"
sha256 "b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"
end
resource "six" do
url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz"
sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/80/be/3ee43b6c5757cabea19e75b8f46eaf05a2f5144107d7db48c7cf3a864f73/urllib3-1.26.7.tar.gz"
sha256 "4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece"
end
resource "websocket-client" do
url "https://files.pythonhosted.org/packages/4e/8f/b5c45af5a1def38b07c09a616be932ad49c35ebdc5e3cbf93966d7ed9750/websocket-client-1.2.1.tar.gz"
sha256 "8dfb715d8a992f5712fff8c843adae94e22b22a99b2c5e6b0ec4a1a981cc4e0d"
end
def install
virtualenv_install_with_resources
man1.install_symlink libexec/"share/man/man1/streamlink.1"
end
test do
system "#{bin}/streamlink", "https://vimeo.com/189776460", "360p", "-o", "video.mp4"
assert_match "video.mp4: ISO Media, MP4 v2", shell_output("file video.mp4")
end
end