2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPackages, pkg-config, openssl
|
2021-06-28 23:13:55 +00:00
|
|
|
, withALSA ? true, alsa-lib
|
2021-03-09 03:18:52 +00:00
|
|
|
, withPulseAudio ? false, libpulseaudio
|
|
|
|
, withPortAudio ? false, portaudio
|
2020-04-24 23:36:52 +00:00
|
|
|
, withMpris ? false
|
|
|
|
, withKeyring ? false
|
2021-03-09 03:18:52 +00:00
|
|
|
, dbus
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
rustPackages.rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "spotifyd";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "0.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Spotifyd";
|
|
|
|
repo = "spotifyd";
|
|
|
|
rev = "v${version}";
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "1a578h13iv8gqmskzlncfr42jlg5gp0zfcizv4wbd48y9hl8fh2l";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
cargoSha256 = "07dxfc0csrnfl01p9vdrqvca9f574svlf37dk3dz8p6q08ki0n1z";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ openssl ]
|
2021-06-28 23:13:55 +00:00
|
|
|
++ lib.optional withALSA alsa-lib
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optional withPulseAudio libpulseaudio
|
|
|
|
++ lib.optional withPortAudio portaudio
|
|
|
|
++ lib.optional (withMpris || withKeyring) dbus;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildNoDefaultFeatures = true;
|
|
|
|
buildFeatures = lib.optional withALSA "alsa_backend"
|
|
|
|
++ lib.optional withPulseAudio "pulseaudio_backend"
|
|
|
|
++ lib.optional withPortAudio "portaudio_backend"
|
|
|
|
++ lib.optional withMpris "dbus_mpris"
|
|
|
|
++ lib.optional withKeyring "dbus_keyring";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An open source Spotify client running as a UNIX daemon";
|
|
|
|
homepage = "https://github.com/Spotifyd/spotifyd";
|
2021-03-09 03:18:52 +00:00
|
|
|
changelog = "https://github.com/Spotifyd/spotifyd/raw/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.gpl3Plus;
|
2020-11-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ anderslundstedt Br1ght0ne marsam ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|