audio: fix librespot playback and use avahi for mDNS
Fix librespot playback by building the dev branch and applying the changes from librespot PR 1528 (https://github.com/librespot-org/librespot/pull/1528) fixing librespot issue 1527 (https://github.com/librespot-org/librespot/issues/1527). Also make librespot use Avahi, since shairport-sync already uses that.
This commit is contained in:
parent
071eb88afa
commit
df365e67f9
4 changed files with 251 additions and 4 deletions
24
flake.nix
24
flake.nix
|
@ -40,6 +40,29 @@
|
|||
proxmox-vm = ./config/proxmox-vm;
|
||||
prometheus-exporter = ./config/extra/prometheus-exporter.nix;
|
||||
};
|
||||
overlays = {
|
||||
librespotFixOverlay = final: prev: {
|
||||
librespot = (prev.librespot.override { withAvahi = true; }).overrideAttrs (finalAttrs: prevAttr: rec {
|
||||
# Build dev branch.
|
||||
name = "${prevAttr.pname}-${version}";
|
||||
version = "dev";
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "librespot-org";
|
||||
repo = "librespot";
|
||||
rev = "dev";
|
||||
sha256 = "sha256-s9JpIbqXiVXMlhEuIuKio+rD1rM3kc7bAT0+8+5s35w=";
|
||||
};
|
||||
cargoDeps = final.rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
hash = "sha256-Lujz2revTAok9B0hzdl8NVQ5XMRY9ACJzoQHIkIgKMg=";
|
||||
};
|
||||
# Fix librespot failing with "Unable to load audio item: Error { kind: Unavailable, error: StatusCode(500) }".
|
||||
patches = (prevAttr.patches or []) ++ [
|
||||
./patches/librespot_PR1528_conflicts_resolved.patch
|
||||
];
|
||||
});
|
||||
};
|
||||
};
|
||||
nixosConfigurations = {
|
||||
audio-hauptraum-kueche = nixpkgs.lib.nixosSystem {
|
||||
inherit system specialArgs;
|
||||
|
@ -56,6 +79,7 @@
|
|||
self.nixosModules.common
|
||||
self.nixosModules.proxmox-vm
|
||||
./config/hosts/audio-hauptraum-tafel
|
||||
{ nixpkgs.overlays = [ self.overlays.librespotFixOverlay ]; }
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue