2023-04-20 06:20:00 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPackages, pkg-config, openssl
|
2021-06-10 04:57:09 +02:00
|
|
|
, withALSA ? true, alsa-lib
|
2021-03-04 00:58:48 +01:00
|
|
|
, withPulseAudio ? false, libpulseaudio
|
|
|
|
, withPortAudio ? false, portaudio
|
2020-04-18 02:29:56 +02:00
|
|
|
, 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";
|
2023-04-20 06:20:00 +02:00
|
|
|
version = "0.3.5";
|
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}";
|
2023-04-20 06:20:00 +02:00
|
|
|
hash = "sha256-+P85FWJIsfAv8/DnQFxfoWvNY8NpbZ2xUidfwN8tiA8=";
|
2019-07-20 19:38:53 +02:00
|
|
|
};
|
|
|
|
|
2023-04-20 06:20:00 +02:00
|
|
|
cargoHash = "sha256-j+2yEtn3D+vNRcY4+NnqSX4xRQIE5Sq7bentxTh6kMI=";
|
2019-07-20 19:38:53 +02:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-07-20 19:38:53 +02:00
|
|
|
|
2023-04-20 06:20:00 +02:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
|
2021-06-10 04:57:09 +02:00
|
|
|
++ lib.optional withALSA alsa-lib
|
2021-01-15 14:21:58 +01:00
|
|
|
++ lib.optional withPulseAudio libpulseaudio
|
|
|
|
++ lib.optional withPortAudio portaudio
|
|
|
|
++ lib.optional (withMpris || withKeyring) dbus;
|
2019-07-20 19:38:53 +02:00
|
|
|
|
2021-11-16 01:05:26 +01: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";
|
|
|
|
|
2019-09-21 09:00:00 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-07-20 19:38:53 +02:00
|
|
|
description = "An open source Spotify client running as a UNIX daemon";
|
2023-04-20 06:20:00 +02:00
|
|
|
homepage = "https://spotifyd.rs/";
|
2021-03-05 12:00:00 +01:00
|
|
|
changelog = "https://github.com/Spotifyd/spotifyd/raw/v${version}/CHANGELOG.md";
|
2021-02-20 16:41:50 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2020-11-17 12:02:06 +01:00
|
|
|
maintainers = with maintainers; [ anderslundstedt Br1ght0ne marsam ];
|
2019-07-20 19:38:53 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|