diff --git a/pkgs/by-name/pine64-alsa-ucm/package.nix b/pkgs/by-name/pine64-alsa-ucm/package.nix index 4ed194705..24aa620c5 100644 --- a/pkgs/by-name/pine64-alsa-ucm/package.nix +++ b/pkgs/by-name/pine64-alsa-ucm/package.nix @@ -28,4 +28,20 @@ stdenv.mkDerivation { runHook postInstall ''; + + # paths in alsa are always relative to the root ucm; + # since we moved stuff around, we have to fix it: + fixupPhase = '' + runHook preFixup + + substituteInPlace $out/share/alsa/ucm2/Allwinner/A64/PinePhone/PinePhone.conf \ + --replace-fail '"HiFi.conf"' '"/Allwinner/A64/PinePhone/HiFi.conf"' \ + --replace-fail '"VoiceCall.conf"' '"/Allwinner/A64/PinePhone/VoiceCall.conf"' + + substituteInPlace $out/share/alsa/ucm2/Rockchip/rk3399/PinePhonePro/PinePhonePro.conf \ + --replace-fail '"HiFi.conf"' '"/Rockchip/rk3399/PinePhonePro/HiFi.conf"' \ + --replace-fail '"VoiceCall.conf"' '"/Rockchip/rk3399/PinePhonePro/VoiceCall.conf"' + + runHook postFixup + ''; }