3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/audio/spotifyd/default.nix

49 lines
1.5 KiB
Nix
Raw Normal View History

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