From f5b0542cb1c1b7a98417b902756848bc9ba51f7e Mon Sep 17 00:00:00 2001 From: Alexandre Macabies Date: Thu, 25 Mar 2021 03:55:46 +0100 Subject: [PATCH 1/2] nixos/snapserver: add support for meta stream type introduced in 0.23.0 --- nixos/modules/services/audio/snapserver.nix | 17 +++++++++++++---- nixos/tests/snapcast.nix | 4 ++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/audio/snapserver.nix b/nixos/modules/services/audio/snapserver.nix index a261b876078..f96b5f3e194 100644 --- a/nixos/modules/services/audio/snapserver.nix +++ b/nixos/modules/services/audio/snapserver.nix @@ -65,7 +65,7 @@ let in { imports = [ - (mkRenamedOptionModule [ "services" "snapserver" "controlPort"] [ "services" "snapserver" "tcp" "port" ]) + (mkRenamedOptionModule [ "services" "snapserver" "controlPort" ] [ "services" "snapserver" "tcp" "port" ]) ]; ###### interface @@ -200,12 +200,21 @@ in { location = mkOption { type = types.oneOf [ types.path types.str ]; description = '' - The location of the pipe, file, Librespot/Airplay/process binary, or a TCP address. - Use an empty string for alsa. + For type pipe or file, the path to the pipe or file. + For type librespot, airplay or process, the path to the corresponding binary. + For type tcp, the host:port address to connect to or listen on. + For type meta, a list of stream names in the form /one/two/.... Don't forget the leading slash. + For type alsa, use an empty string. + ''; + example = literalExample '' + "/path/to/pipe" + "/path/to/librespot" + "192.168.1.2:4444" + "/MyTCP/Spotify/MyPipe" ''; }; type = mkOption { - type = types.enum [ "pipe" "librespot" "airplay" "file" "process" "tcp" "alsa" "spotify" ]; + type = types.enum [ "pipe" "librespot" "airplay" "file" "process" "tcp" "alsa" "spotify" "meta" ]; default = "pipe"; description = '' The type of input stream. diff --git a/nixos/tests/snapcast.nix b/nixos/tests/snapcast.nix index 2fef6362514..ef35d586c9c 100644 --- a/nixos/tests/snapcast.nix +++ b/nixos/tests/snapcast.nix @@ -34,6 +34,10 @@ in { type = "tcp"; location = "127.0.0.1:${toString tcpStreamPort}"; }; + meta = { + type = "meta"; + location = "/mpd/bluetooth/tcp"; + }; }; }; }; From a32d17941f6c2b02d16c1c16195f654f23bbdfa2 Mon Sep 17 00:00:00 2001 From: Alexandre Macabies Date: Thu, 25 Mar 2021 04:02:58 +0100 Subject: [PATCH 2/2] snapcast: v0.23.0 -> v0.24.0 Also, specify the more accurate license 'gpl3Plus'. --- pkgs/applications/audio/snapcast/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/audio/snapcast/default.nix b/pkgs/applications/audio/snapcast/default.nix index 681601c7d88..18d073caba7 100644 --- a/pkgs/applications/audio/snapcast/default.nix +++ b/pkgs/applications/audio/snapcast/default.nix @@ -20,8 +20,8 @@ let aixlog = dependency { name = "aixlog"; - version = "1.4.0"; - sha256 = "0f2bs5j1jjajcpa251dslnwkgglaam3b0cm6wdx5l7mbwvnmib2g"; + version = "1.5.0"; + sha256 = "09mnkrans9zmwfxsiwgkm0rba66c11kg5zby9x3rjic34gnmw6ay"; }; popl = dependency { @@ -34,13 +34,13 @@ in stdenv.mkDerivation rec { pname = "snapcast"; - version = "0.23.0"; + version = "0.24.0"; src = fetchFromGitHub { owner = "badaix"; repo = "snapcast"; rev = "v${version}"; - sha256 = "0183hhghzn0fhw2qzc1s009q7miabpcf0pxaqjdscsl8iivxqknd"; + sha256 = "13yz8alplnqwkcns3mcli01qbyy6l3h62xx0v71ygcrz371l4g9g"; }; nativeBuildInputs = [ cmake pkg-config boost170.dev ]; @@ -64,6 +64,6 @@ stdenv.mkDerivation rec { description = "Synchronous multi-room audio player"; homepage = "https://github.com/badaix/snapcast"; maintainers = with maintainers; [ fpletz ]; - license = licenses.gpl3; + license = licenses.gpl3Plus; }; }