2019-07-20 18:38:53 +01:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl
|
|
|
|
, withALSA ? true, alsaLib ? null
|
|
|
|
, withPulseAudio ? false, libpulseaudio ? null
|
|
|
|
, withPortAudio ? false, portaudio ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "spotifyd";
|
2019-10-05 10:20:00 +01:00
|
|
|
version = "0.2.18";
|
2019-07-20 18:38:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Spotifyd";
|
|
|
|
repo = "spotifyd";
|
2019-09-21 08:00:00 +01:00
|
|
|
rev = "v${version}";
|
2019-10-05 10:20:00 +01:00
|
|
|
sha256 = "12826b0wf31m9vw1s7bcd1hb4ygb1xn4sdknn1y9kzc68brsq94v";
|
2019-07-20 18:38:53 +01:00
|
|
|
};
|
|
|
|
|
2019-09-28 21:55:53 +01:00
|
|
|
cargoSha256 = "0ar4bfwn3qxa6wsz2hd7nv1wr824h74jy3xqba2qsy0rsfwy1bmm";
|
2019-07-20 18:38:53 +01:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2019-09-21 08:00:00 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2019-07-20 18:38:53 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|