Commit 33b4d77b authored by DSeeLP's avatar DSeeLP
Browse files

shairport-sync: use new names of pipewire and pulseaudio backends

The pipewire and pulseaudio backends where renamed from `pw` to
`pipewire` and from `pa` to `pulseaudio` in shairport-sync 5.0.

See https://github.com/mikebrady/shairport-sync/commit/b405c0b89651aaa276cfa1fabb36e2b2ba38fb7a#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810
parent 075a836c
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -38,13 +38,13 @@ in
      settings = mkOption {
        type = configFormat.type;
        default = {
          general.output_backend = "pa";
          general.output_backend = "pulseaudio";
          diagnostics.log_verbosity = 1;
        };
        example = {
          general = {
            name = "NixOS Shairport";
            output_backend = "pw";
            output_backend = "pipewire";
          };
          metadata = {
            enabled = "yes";
@@ -112,13 +112,23 @@ in
  ###### implementation

  config = mkIf config.services.shairport-sync.enable {
    assertions = [
      {
        assertion = config.services.shairport-sync.settings.general.output_backend or null != "pw";
        message = "shairport-sync 5.0 renamed the pipewire backend from 'pw' to 'pipewire'";
      }
      {
        assertion = config.services.shairport-sync.settings.general.output_backend or null != "pa";
        message = "shairport-sync 5.0 renamed the pulseaudio backend from 'pa' to 'pulseaudio'";
      }
    ];

    services.avahi.enable = true;
    services.avahi.publish.enable = true;
    services.avahi.publish.userServices = true;

    services.shairport-sync.settings = {
      general.output_backend = lib.mkDefault "pa";
      general.output_backend = lib.mkDefault "pulseaudio";
      diagnostics.log_verbosity = lib.mkDefault 1;
    };

+2 −2
Original line number Diff line number Diff line
@@ -119,8 +119,8 @@ stdenv.mkDerivation (finalAttrs: {
    "--with-ssl=openssl"
  ]
  ++ optional enableAvahi "--with-avahi"
  ++ optional enablePulse "--with-pa"
  ++ optional enablePipewire "--with-pw"
  ++ optional enablePulse "--with-pulseaudio"
  ++ optional enablePipewire "--with-pipewire"
  ++ optional enableAlsa "--with-alsa"
  ++ optional enableSndio "--with-sndio"
  ++ optional enableAo "--with-ao"