nixpkgs-suyu/pkgs/applications/audio/spotifyd/default.nix

48 lines
1.5 KiB
Nix
Raw Normal View History

2021-03-05 12:00:00 +01:00
{ lib, fetchFromGitHub, rustPackages, pkg-config, openssl
2021-03-04 00:58:48 +01:00
, withALSA ? true, alsaLib
, withPulseAudio ? false, libpulseaudio
, withPortAudio ? false, portaudio
, withMpris ? false
, withKeyring ? false
2021-03-04 00:58:48 +01:00
, dbus
2019-07-20 19:38:53 +02:00
}:
2021-03-05 12:00:00 +01:00
rustPackages.rustPlatform.buildRustPackage rec {
2019-07-20 19:38:53 +02:00
pname = "spotifyd";
2021-03-05 12:00:00 +01:00
version = "0.3.2";
2019-07-20 19:38:53 +02:00
src = fetchFromGitHub {
owner = "Spotifyd";
repo = "spotifyd";
2019-09-21 09:00:00 +02:00
rev = "v${version}";
2021-03-05 12:00:00 +01:00
sha256 = "1a578h13iv8gqmskzlncfr42jlg5gp0zfcizv4wbd48y9hl8fh2l";
2019-07-20 19:38:53 +02:00
};
2021-03-05 12:00:00 +01:00
cargoSha256 = "1sm5yfgjx5xfnqqh1v8ycwzxw4kl6dq5gcvsdnc4h1cj3pdhbpcc";
2019-07-20 19:38:53 +02:00
cargoBuildFlags = [
"--no-default-features"
"--features"
2021-01-15 14:21:58 +01: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 19:38:53 +02:00
];
nativeBuildInputs = [ pkg-config ];
2019-07-20 19:38:53 +02:00
buildInputs = [ openssl ]
2021-01-15 14:21:58 +01:00
++ lib.optional withALSA alsaLib
++ lib.optional withPulseAudio libpulseaudio
++ lib.optional withPortAudio portaudio
++ lib.optional (withMpris || withKeyring) dbus;
2019-07-20 19:38:53 +02:00
2019-09-21 09:00:00 +02:00
doCheck = false;
meta = with lib; {
2019-07-20 19:38:53 +02:00
description = "An open source Spotify client running as a UNIX daemon";
homepage = "https://github.com/Spotifyd/spotifyd";
2021-03-05 12:00:00 +01:00
changelog = "https://github.com/Spotifyd/spotifyd/raw/v${version}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ anderslundstedt Br1ght0ne marsam ];
2019-07-20 19:38:53 +02:00
platforms = platforms.unix;
};
}