2020-12-06 09:53:22 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPackages_1_45, pkgconfig, openssl
|
2019-07-20 18:38:53 +01:00
|
|
|
, withALSA ? true, alsaLib ? null
|
|
|
|
, withPulseAudio ? false, libpulseaudio ? null
|
|
|
|
, withPortAudio ? false, portaudio ? null
|
2020-04-18 01:29:56 +01:00
|
|
|
, withMpris ? false
|
|
|
|
, withKeyring ? false
|
|
|
|
, dbus ? null
|
2019-07-20 18:38:53 +01:00
|
|
|
}:
|
|
|
|
|
2020-12-06 09:53:22 +00:00
|
|
|
# rust >= 1.48 causes a panic within spotifyd on music playback. as long as
|
|
|
|
# there is no upstream fix for the issue we use an older version of rust.
|
|
|
|
# Upstream issue: https://github.com/Spotifyd/spotifyd/issues/719
|
|
|
|
rustPackages_1_45.rustPlatform.buildRustPackage rec {
|
2019-07-20 18:38:53 +01:00
|
|
|
pname = "spotifyd";
|
2020-01-27 20:28:36 +00:00
|
|
|
version = "0.2.24";
|
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}";
|
2020-01-27 20:28:36 +00:00
|
|
|
sha256 = "08i0zm7kgprixqjpgaxk7xid1njgj6lmi896jf9fsjqzdzlblqk8";
|
2019-07-20 18:38:53 +01:00
|
|
|
};
|
|
|
|
|
2020-02-14 18:57:39 +00:00
|
|
|
cargoSha256 = "0200apqbx769ggjnjr0m72g61ikhml2xak5n1il2pvfx1yf5nw0n";
|
2019-07-20 18:38:53 +01:00
|
|
|
|
|
|
|
cargoBuildFlags = [
|
|
|
|
"--no-default-features"
|
|
|
|
"--features"
|
2020-04-18 01:29:56 +01:00
|
|
|
"${stdenv.lib.optionalString withALSA "alsa_backend,"}${stdenv.lib.optionalString withPulseAudio "pulseaudio_backend,"}${stdenv.lib.optionalString withPortAudio "portaudio_backend,"}${stdenv.lib.optionalString withMpris "dbus_mpris,"}${stdenv.lib.optionalString withKeyring "dbus_keyring,"}"
|
2019-07-20 18:38:53 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ stdenv.lib.optional withALSA alsaLib
|
|
|
|
++ stdenv.lib.optional withPulseAudio libpulseaudio
|
2020-04-18 01:29:56 +01:00
|
|
|
++ stdenv.lib.optional withPortAudio portaudio
|
|
|
|
++ stdenv.lib.optional (withMpris || withKeyring) dbus;
|
2019-07-20 18:38:53 +01:00
|
|
|
|
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 ];
|
2020-11-17 11:02:06 +00:00
|
|
|
maintainers = with maintainers; [ anderslundstedt Br1ght0ne marsam ];
|
2019-07-20 18:38:53 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|