2021-01-19 06:50:56 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPackages, pkg-config, 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
|
|
|
}:
|
|
|
|
|
2021-01-17 04:20:00 +00:00
|
|
|
rustPackages.rustPlatform.buildRustPackage rec {
|
2019-07-20 18:38:53 +01:00
|
|
|
pname = "spotifyd";
|
2021-01-17 04:20:00 +00:00
|
|
|
version = "0.3.0";
|
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}";
|
2021-01-17 04:20:00 +00:00
|
|
|
sha256 = "055njhy9if4qpsbgbr6615xxhcx9plava1m4l323vi4dbw09wh5r";
|
2019-07-20 18:38:53 +01:00
|
|
|
};
|
|
|
|
|
2021-01-17 04:20:00 +00:00
|
|
|
cargoSha256 = "1ijrl208607abjwpr3cajcbj6sr35bk6ik778a58zf28kzdhrawc";
|
2019-07-20 18:38:53 +01:00
|
|
|
|
|
|
|
cargoBuildFlags = [
|
|
|
|
"--no-default-features"
|
|
|
|
"--features"
|
2021-01-15 13:21:58 +00:00
|
|
|
"${lib.optionalString withALSA "alsa_backend,"}${lib.optionalString withPulseAudio "pulseaudio_backend,"}${lib.optionalString withPortAudio "portaudio_backend,"}${lib.optionalString withMpris "dbus_mpris,"}${lib.optionalString withKeyring "dbus_keyring,"}"
|
2019-07-20 18:38:53 +01:00
|
|
|
];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-07-20 18:38:53 +01:00
|
|
|
|
|
|
|
buildInputs = [ openssl ]
|
2021-01-15 13:21:58 +00:00
|
|
|
++ lib.optional withALSA alsaLib
|
|
|
|
++ lib.optional withPulseAudio libpulseaudio
|
|
|
|
++ lib.optional withPortAudio portaudio
|
|
|
|
++ lib.optional (withMpris || withKeyring) dbus;
|
2019-07-20 18:38:53 +01:00
|
|
|
|
2019-09-21 08:00:00 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-20 18:38:53 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|