nixpkgs/pkgs/applications/audio/spotifyd/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

47 lines
1.5 KiB
Nix

{ lib, fetchFromGitHub, rustPackages, pkg-config, openssl
, withALSA ? true, alsaLib ? null
, withPulseAudio ? false, libpulseaudio ? null
, withPortAudio ? false, portaudio ? null
, withMpris ? false
, withKeyring ? false
, dbus ? null
}:
rustPackages.rustPlatform.buildRustPackage rec {
pname = "spotifyd";
version = "0.3.0";
src = fetchFromGitHub {
owner = "Spotifyd";
repo = "spotifyd";
rev = "v${version}";
sha256 = "055njhy9if4qpsbgbr6615xxhcx9plava1m4l323vi4dbw09wh5r";
};
cargoSha256 = "1ijrl208607abjwpr3cajcbj6sr35bk6ik778a58zf28kzdhrawc";
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";
license = with licenses; [ gpl3 ];
maintainers = with maintainers; [ anderslundstedt Br1ght0ne marsam ];
platforms = platforms.unix;
};
}