I’m currently trying to package asahi-audio for NixOS as cleanly as possible. asahi-audio
itself is basically “only” a collection of config files for pipewire, wireplumber, and some adjacent WAV files for finite impulse response (FIR) filters fed into pipewire’s convolver.
For the config files I’ve already adapted the pipewire and wireplumber NixOS modules to also have a configPackages
option from which config files are collected via lib.buildEnv
and linked to /etc
. I’m planning to try and upstream that some time soon.
What I’m currently still unsure about is the LV2_PATH
. asahi-audio
also uses two plugins that aren’t internal to pipewire, both LV2 plugins. I could just create a new asahi-audio NixOS module which takes care of setting the path in environment.sessionVariables
, but that a) sets the path for everything, which IMO is not as clean as I’m used to from NixOS and b) requires a NixOS module or manual additions to that path for each further package like asahi-audio that deals with pipewire filter-chains using LV2 plugins.
What I’d want ideally would be to just add pkgs.asahi-audio
to services.pipewire.wireplumber.configPackages
and that’d be it. Currently when wireplumber
is enabled, all wireplumber config packages also get included in the pipewire buildEnv
, for convenience (the interest paths are set accordingly). So with that adding new packages like asahi-audio
would be easy. Now my question is: How could I accomplish that?
Is there some way to specify and later collect all LV2 path requirements from dependencies so that those can be included in the LV2_PATH used by pipewire and pipewire only?
Note: LADSPA plugins can just be specified via their .so path, as far as I can tell this is not the case for LV2, as with LV2 there are also accompanying metadata files.
Note2: I’m packaging asahi-audio so I can fiddle with my (non-mac) laptop speakers to get them to sound better. I’ll therefore be poking around in those files quite a bit, but for your average user (for now only on macs) things should Just Work™ upon installation, which is why I would like installation to be clean.