Skip to content

Instantly share code, notes, and snippets.

@Yarn
Last active November 2, 2019 01:44
Show Gist options
  • Save Yarn/6322faec65c7a5480954d33650a1962b to your computer and use it in GitHub Desktop.
Save Yarn/6322faec65c7a5480954d33650a1962b to your computer and use it in GitHub Desktop.
# Documentation: https://docs.brew.sh/Formula-Cookbook
# https://rubydoc.brew.sh/Formula
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Spotifyd < Formula
desc "A spotify daemon"
homepage "https://github.com/Spotifyd/spotifyd"
url "https://github.com/Yarn/spotifyd/archive/vtest.0.1.tar.gz"
sha256 "49ad500fa1e24ffa2341451a1bbdffbad059990f38239d5329c6974dcdb941c6"
head "https://github.com/Spotifyd/spotifyd.git"
depends_on "rust" => :build
def install
system "cargo", "build", "--release", "--no-default-features", "--features", "rodio_backend"
bin.install "./target/release/spotifyd"
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! For Homebrew/homebrew-core
# this will need to be a test that verifies the functionality of the
# software. Run the test with `brew test spotifyd`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "false"
end
end
class SpotifydBin < Formula
desc "A spotify daemon"
homepage "https://github.com/Spotifyd/spotifyd"
url "https://github.com/Yarn/spotifyd/releases/download/vtest.0.1/spotifyd-macos-rodio-slim.tar.gz"
sha256 "7cdf03c98bcd36f4bf322078ee67cb7272bc61ca5a3431a13681ed351b1b1ff2"
head "https://github.com/Spotifyd/spotifyd.git"
def install
bin.install "./spotifyd"
end
test do
system "#{bin}/spotifyd", "--version"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment