mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 19:45:54 +00:00
48 lines
1.5 KiB
Nix
48 lines
1.5 KiB
Nix
{ lib, fetchFromGitHub, rustPackages, pkg-config, openssl
|
|
, withALSA ? true, alsaLib
|
|
, withPulseAudio ? false, libpulseaudio
|
|
, withPortAudio ? false, portaudio
|
|
, withMpris ? false
|
|
, withKeyring ? false
|
|
, dbus
|
|
}:
|
|
|
|
rustPackages.rustPlatform.buildRustPackage rec {
|
|
pname = "spotifyd";
|
|
version = "0.3.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Spotifyd";
|
|
repo = "spotifyd";
|
|
rev = "v${version}";
|
|
sha256 = "1a578h13iv8gqmskzlncfr42jlg5gp0zfcizv4wbd48y9hl8fh2l";
|
|
};
|
|
|
|
cargoSha256 = "1sm5yfgjx5xfnqqh1v8ycwzxw4kl6dq5gcvsdnc4h1cj3pdhbpcc";
|
|
|
|
cargoBuildFlags = [
|
|
"--no-default-features"
|
|
"--features"
|
|
"${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,"}"
|
|
];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ openssl ]
|
|
++ lib.optional withALSA alsaLib
|
|
++ lib.optional withPulseAudio libpulseaudio
|
|
++ lib.optional withPortAudio portaudio
|
|
++ lib.optional (withMpris || withKeyring) dbus;
|
|
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "An open source Spotify client running as a UNIX daemon";
|
|
homepage = "https://github.com/Spotifyd/spotifyd";
|
|
changelog = "https://github.com/Spotifyd/spotifyd/raw/v${version}/CHANGELOG.md";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ anderslundstedt Br1ght0ne marsam ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|