nixpkgs/pkgs/applications/audio/spotifyd/default.nix
2019-10-05 04:20:00 -05:00

43 lines
1.3 KiB
Nix

{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl
, withALSA ? true, alsaLib ? null
, withPulseAudio ? false, libpulseaudio ? null
, withPortAudio ? false, portaudio ? null
}:
rustPlatform.buildRustPackage rec {
pname = "spotifyd";
version = "0.2.18";
src = fetchFromGitHub {
owner = "Spotifyd";
repo = "spotifyd";
rev = "v${version}";
sha256 = "12826b0wf31m9vw1s7bcd1hb4ygb1xn4sdknn1y9kzc68brsq94v";
};
cargoSha256 = "0ar4bfwn3qxa6wsz2hd7nv1wr824h74jy3xqba2qsy0rsfwy1bmm";
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;
doCheck = false;
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;
};
}