From 03eb0b15127808f7d59ff2844e5e16d186a819b6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 5 Jul 2021 16:46:30 -0400 Subject: [PATCH] alsa-lib 1.2.5 -> 1.2.5.1 Fixes ALSA failing to find sound devices. Revert this once 1.2.5.1 makes it into nixos-unstable. This unfortunately causes a lot of compiling at nixos-rebuild time. --- modules/hardware/audio.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/hardware/audio.nix b/modules/hardware/audio.nix index 9508b3d4..9b70b0da 100644 --- a/modules/hardware/audio.nix +++ b/modules/hardware/audio.nix @@ -9,6 +9,21 @@ in { }; config = mkIf cfg.enable { + # HACK Due to alsa-project/alsa-lib#143, ALSA/pulseaudio can't find sound + # devices. The 1.2.5.1 hotfix addresses this, but isn't in nixpkgs yet. + nixpkgs.overlays = [ + (self: super: with super; { + alsa-lib = super.alsa-lib.overrideAttrs (old: rec { + pname = "alsa-lib"; + version = "1.2.5.1"; + src = pkgs.fetchurl { + url = "mirror://alsa/lib/${pname}-${version}.tar.bz2"; + sha256 = "sha256-YoQh2VDOyvI03j+JnVIMCmkjMTyWStdR/6wIHfMxQ44="; + }; + }); + }) + ]; + sound.enable = true; hardware.pulseaudio.enable = true;