From f01c9db4126e96f4c1a00c491aaaf309ca596cb1 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 16 Dec 2022 23:39:35 -0500 Subject: [PATCH] librespot: unbreak on darwin --- pkgs/applications/audio/librespot/default.nix | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/audio/librespot/default.nix b/pkgs/applications/audio/librespot/default.nix index 5917739f2442..f477b811d70f 100644 --- a/pkgs/applications/audio/librespot/default.nix +++ b/pkgs/applications/audio/librespot/default.nix @@ -1,6 +1,17 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, withRodio ? true -, withALSA ? true, alsa-lib ? null, withPulseAudio ? false, libpulseaudio ? null -, withPortAudio ? false, portaudio ? null }: +{ lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, stdenv +, openssl +, withALSA ? true +, alsa-lib +, withPortAudio ? false +, portaudio +, withPulseAudio ? false +, libpulseaudio +, withRodio ? true +}: rustPlatform.buildRustPackage rec { pname = "librespot"; @@ -15,26 +26,26 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-tbDlWP0sUIa0W9HhdYNOvo9cGeqFemclhA7quh7f/Rw="; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ + rustPlatform.bindgenHook + ]; - buildInputs = [ openssl ] ++ lib.optional withALSA alsa-lib - ++ lib.optional withPulseAudio libpulseaudio - ++ lib.optional withPortAudio portaudio; + buildInputs = [ openssl ] + ++ lib.optional withALSA alsa-lib + ++ lib.optional withPortAudio portaudio + ++ lib.optional withPulseAudio libpulseaudio; buildNoDefaultFeatures = true; buildFeatures = lib.optional withRodio "rodio-backend" ++ lib.optional withALSA "alsa-backend" - ++ lib.optional withPulseAudio "pulseaudio-backend" - ++ lib.optional withPortAudio "portaudio-backend"; - - doCheck = false; + ++ lib.optional withPortAudio "portaudio-backend" + ++ lib.optional withPulseAudio "pulseaudio-backend"; meta = with lib; { description = "Open Source Spotify client library and playback daemon"; homepage = "https://github.com/librespot-org/librespot"; + changelog = "https://github.com/librespot-org/librespot/blob/v${version}/CHANGELOG.md"; license = with licenses; [ mit ]; maintainers = with maintainers; [ bennofs ]; - platforms = platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/librespot.x86_64-darwin }; }