Help with avoiding 50gb worth of rebuils

@rjpc

I wonder if that with pkgs in the overlay is the culprit? I wonder if it’s bringing in things to scope you don’t want it to.

Doesn’t seem to be the case.

@vs49688

This is what I ended up trying:

      cml-ucm-conf = pkgs.alsa-ucm-conf.overrideAttrs {
        wttsrc = pkgs.fetchurl {
          url =
            "https://github.com/WeirdTreeThing/chromebook-ucm-conf/archive/2b2f3a7c993fd38a24aa81394e29ee530b890658.tar.gz";
          hash = "sha256-WeLkxWB174Hwb11xnIxsvRm5NpM528IVEYH4K32pLwg=";
        };
        unpackPhase = ''
          runHook preUnpack
          tar xf "$src"
          tar xf "$wttsrc"
          runHook postUnpack
        '';
        installPhase = ''
          runHook preInstall
          mkdir -p $out/share/alsa
          cp -r alsa-ucm*/{ucm,ucm2} $out/share/alsa
          cp -r chromebook-ucm*/common $out/share/alsa/ucm2/common
          cp -r chromebook-ucm*/codecs $out/share/alsa/ucm2/codecs
          cp -r chromebook-ucm*/platforms $out/share/alsa/ucm2/platforms
          cp -r chromebook-ucm*/sof-rt5682 $out/share/alsa/ucm2/conf.d/sof-rt5682
          cp -r chromebook-ucm*/sof-cs42l42 $out/share/alsa/ucm2/conf.d/sof-cs42l42
          cp -r chromebook-ucm*/cml/* $out/share/alsa/ucm2/conf.d
          runHook postInstall
        '';
      };
    in "${cml-ucm-conf}/share/alsa/ucm2";

It builds fine, but unfortunately doesn’t fix my audio as it should.

@tobiasBora

Otherwise, it might be possible to use the system that allows you to use a system-wide library different from the one used in packages without recompiling… I forgot the name of the nixos parameter to change, but for sure there is one ^^

That’s exactly what I’ve been looking for, but my google skills have failed me.