Skip to content

Commit

Permalink
alsa-ucm-conf-aahi: rework for finalAttrs changes
Browse files Browse the repository at this point in the history
Don't override version attribute as that now gets picked up and used to
download the wrong alsa-ucm-conf source code, breaking the build.

Instead, directly generate a new and more meaningful name. Also don't
inject the Asahi-specific attributes into the derivation to ensure they
don't conflict.
  • Loading branch information
tpwrules committed Jan 23, 2025
1 parent 8810ae0 commit 866c372
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions apple-silicon-support/packages/alsa-ucm-conf-asahi/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{ lib
, fetchFromGitHub
, alsa-ucm-conf }:
, alsa-ucm-conf
}:

(alsa-ucm-conf.overrideAttrs (oldAttrs: rec {
version = "5";
(alsa-ucm-conf.overrideAttrs (oldAttrs: let
versionAsahi = "5";

src_asahi = fetchFromGitHub {
srcAsahi = fetchFromGitHub {
# tracking: https://src.fedoraproject.org/rpms/alsa-ucm-asahi
owner = "AsahiLinux";
repo = "alsa-ucm-conf-asahi";
rev = "v${version}";
rev = "v${versionAsahi}";
hash = "sha256-daUNz5oUrPfSMO0Tqq/WbtiLHMOtPeQQlI+juGrhTxw=";
};

in {
name = "${oldAttrs.pname}-${oldAttrs.version}-asahi-${versionAsahi}";

postInstall = oldAttrs.postInstall or "" + ''
cp -r ${src_asahi}/ucm2 $out/share/alsa
cp -r ${srcAsahi}/ucm2 $out/share/alsa
'';
}))

0 comments on commit 866c372

Please sign in to comment.