anchor.diff:                             && pkgs.stdenv.isx86_64
                              && pkgs.pkgsi686Linux.pipewire != null;
   
  +  # The package doesn't output to $out/lib/pipewire directly so that the
  +  # overlays can use the outputs to replace the originals in FHS environments.
  +  #
  +  # This doesn't work in general because of missing development information.
     jack-libs = pkgs.runCommand "jack-libs" {} ''
       mkdir -p "$out/lib"
       ln -s "${pkgs.pipewire.jack}/lib" "$out/lib/pipewire"
  
positive.code: 
    ###### implementation
    config = mkIf cfg.enable {
      environment.systemPackages = [ pkgs.pipewire ]
                                   ++ lib.optional cfg.jack.enable jack-libs
                                   ++ lib.optional cfg.pulse.enable pulse-libs;
  
      systemd.packages = [ pkgs.pipewire ];
  
      systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
      systemd.user.services.pipewire.bindsTo = [ "dbus.service" ];
      services.udev.packages = [ pkgs.pipewire ];
  
negative.code:     environment.etc."alsa/conf.d/50-pipewire.conf" = mkIf cfg.alsa.enable {
        source = "${pkgs.pipewire}/share/alsa/alsa.conf.d/50-pipewire.conf";
      };
      environment.sessionVariables.LD_LIBRARY_PATH =
        lib.optional (cfg.alsa.enable || cfg.jack.enable || cfg.pulse.enable) "/run/current-system/sw/lib/pipewire";
    };
  }
  