nixpkgs/pkgs/applications/audio/librespot/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.4 KiB
Nix
Raw Normal View History

2022-01-24 19:58:20 +01:00
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, withRodio ? true
, withALSA ? true, alsa-lib ? null, withPulseAudio ? false, libpulseaudio ? null
2020-07-29 09:30:48 +02:00
, withPortAudio ? false, portaudio ? null }:
2020-06-18 14:27:37 +02:00
rustPlatform.buildRustPackage rec {
pname = "librespot";
2022-08-11 08:29:25 +02:00
version = "0.4.2";
2020-06-18 14:27:37 +02:00
src = fetchFromGitHub {
owner = "librespot-org";
repo = "librespot";
rev = "v${version}";
2022-08-11 08:29:25 +02:00
sha256 = "sha256-DtF6asSlLdC2m/0JTBo4YUx9HgsojpfiqVdqaIwniKA=";
2020-06-18 14:27:37 +02:00
};
2022-08-11 08:29:25 +02:00
cargoSha256 = "sha256-tbDlWP0sUIa0W9HhdYNOvo9cGeqFemclhA7quh7f/Rw=";
2020-06-18 14:27:37 +02:00
nativeBuildInputs = [ pkg-config ];
2020-06-18 14:27:37 +02:00
buildInputs = [ openssl ] ++ lib.optional withALSA alsa-lib
2021-01-15 14:21:58 +01:00
++ lib.optional withPulseAudio libpulseaudio
++ lib.optional withPortAudio portaudio;
2020-06-18 14:27:37 +02:00
2021-11-16 01:06:51 +01:00
buildNoDefaultFeatures = true;
buildFeatures = lib.optional withRodio "rodio-backend"
++ lib.optional withALSA "alsa-backend"
++ lib.optional withPulseAudio "pulseaudio-backend"
++ lib.optional withPortAudio "portaudio-backend";
2020-06-18 14:27:37 +02:00
doCheck = false;
meta = with lib; {
2020-06-18 14:27:37 +02:00
description = "Open Source Spotify client library and playback daemon";
homepage = "https://github.com/librespot-org/librespot";
license = with licenses; [ mit ];
maintainers = with maintainers; [ bennofs ];
platforms = platforms.unix;
2022-01-24 19:58:20 +01:00
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/librespot.x86_64-darwin
2020-06-18 14:27:37 +02:00
};
}