{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl , withALSA ? true, alsaLib ? null , withPulseAudio ? false, libpulseaudio ? null , withPortAudio ? false, portaudio ? null }: rustPlatform.buildRustPackage rec { pname = "spotifyd"; version = "0.2.14"; src = fetchFromGitHub { owner = "Spotifyd"; repo = "spotifyd"; rev = "v${version}"; sha256 = "1hbcyc5rdrvdnvvsgaykqamq4i0yq8wqq5qjp6zjf4jlaxxif4nz"; }; cargoSha256 = "15gd8shg0mn4vsma2hckj6w8gkwr58iniyfw1vjrh4clw4x7ibb4"; cargoBuildFlags = [ "--no-default-features" "--features" "${stdenv.lib.optionalString withALSA "alsa_backend,"}${stdenv.lib.optionalString withPulseAudio "pulseaudio_backend,"}${stdenv.lib.optionalString withPortAudio "portaudio_backend,"}" ]; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ openssl ] ++ stdenv.lib.optional withALSA alsaLib ++ stdenv.lib.optional withPulseAudio libpulseaudio ++ stdenv.lib.optional withPortAudio portaudio; doCheck = false; meta = with stdenv.lib; { description = "An open source Spotify client running as a UNIX daemon"; homepage = "https://github.com/Spotifyd/spotifyd"; license = with licenses; [ gpl3 ]; maintainers = [ maintainers.anderslundstedt ]; platforms = platforms.unix; }; }