From fe64c8950f8903d9823aae8dc26cc6e86f16f22d Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 10 Oct 2024 03:48:47 +0000 Subject: [PATCH] pine64-alsa-ucm: fix install paths --- pkgs/by-name/pine64-alsa-ucm/package.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 + ''; }