mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-21 20:34:06 +00:00
librespot: Set ALSA_PLUGIN_DIR
This commit is contained in:
parent
c1b3bfba4f
commit
d80a9f0e21
@ -1,11 +1,13 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, stdenv
|
||||
, openssl
|
||||
, withALSA ? true
|
||||
, alsa-lib
|
||||
, alsa-plugins
|
||||
, withPortAudio ? false
|
||||
, portaudio
|
||||
, withPulseAudio ? false
|
||||
@ -26,7 +28,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoSha256 = "sha256-tbDlWP0sUIa0W9HhdYNOvo9cGeqFemclhA7quh7f/Rw=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [
|
||||
nativeBuildInputs = [ pkg-config makeWrapper ] ++ lib.optionals stdenv.isDarwin [
|
||||
rustPlatform.bindgenHook
|
||||
];
|
||||
|
||||
@ -41,6 +43,11 @@ rustPlatform.buildRustPackage rec {
|
||||
++ lib.optional withPortAudio "portaudio-backend"
|
||||
++ lib.optional withPulseAudio "pulseaudio-backend";
|
||||
|
||||
postFixup = lib.optionalString withALSA ''
|
||||
wrapProgram "$out/bin/librespot" \
|
||||
--set ALSA_PLUGIN_DIR '${alsa-plugins}/lib/alsa-lib'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open Source Spotify client library and playback daemon";
|
||||
homepage = "https://github.com/librespot-org/librespot";
|
||||
|
Loading…
Reference in New Issue
Block a user