From d91f451ef05e45e39793248d2d29f857ad34b56d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 1 Jan 2026 19:12:10 +0100 Subject: [PATCH 1/4] libigloo: init at 0.9.5 --- pkgs/by-name/li/libigloo/package.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pkgs/by-name/li/libigloo/package.nix diff --git a/pkgs/by-name/li/libigloo/package.nix b/pkgs/by-name/li/libigloo/package.nix new file mode 100644 index 000000000000..89dc3a318127 --- /dev/null +++ b/pkgs/by-name/li/libigloo/package.nix @@ -0,0 +1,27 @@ +{ + lib, + stdenv, + fetchurl, + rhash, + icecast, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libigloo"; + version = "0.9.5"; + + src = fetchurl { + url = "https://downloads.xiph.org/releases/igloo/libigloo-${finalAttrs.version}.tar.gz"; + hash = "sha256-6iLpEZ96IYiBD5kQDFFVxnYtRZWuITuawp5ptPC4cok="; + }; + + buildInputs = [ rhash ]; + + doCheck = true; + + meta = { + description = "Generic C framework used and developed by the Icecast project"; + license = lib.licenses.gpl2Only; + inherit (icecast.meta) maintainers; + }; +}) From 47d1011a3e497119111a2e25a6c043dce3e41e45 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 1 Jan 2026 19:16:09 +0100 Subject: [PATCH 2/4] icecast: 2.4.4 -> 2.5.0 https://icecast.org/news/icecast-release-2_5_0/ --- pkgs/by-name/ic/icecast/package.nix | 37 +++++++++++++++++------------ 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/ic/icecast/package.nix b/pkgs/by-name/ic/icecast/package.nix index 7200b2e25c90..1c67acf92add 100644 --- a/pkgs/by-name/ic/icecast/package.nix +++ b/pkgs/by-name/ic/icecast/package.nix @@ -2,34 +2,41 @@ lib, stdenv, fetchurl, - libxml2, - libxslt, + pkg-config, curl, - libvorbis, - libtheora, - speex, + libigloo, libkate, libopus, + libtheora, + libvorbis, + libxml2, + libxslt, + rhash, + speex, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "icecast"; - version = "2.4.4"; + version = "2.5.0"; src = fetchurl { - url = "http://downloads.xiph.org/releases/icecast/icecast-${version}.tar.gz"; - sha256 = "0i2d9rhav0x6js2qhjf5iy6j2a7f0d11ail0lfv40hb1kygrgda9"; + url = "http://downloads.xiph.org/releases/icecast/icecast-${finalAttrs.version}.tar.gz"; + hash = "sha256-2aoHx0Ka7BnZUP9v1CXDcfdxWM00/yIPwZGywYbGfHo="; }; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ - libxml2 - libxslt curl - libvorbis - libtheora - speex + libigloo libkate libopus + libtheora + libvorbis + libxml2 + libxslt + rhash + speex ]; meta = { @@ -50,4 +57,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ jcumming ]; platforms = with lib.platforms; unix; }; -} +}) From 77b2f5d644f2bf8d81728646ab7b67cc2d4c1dc4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 1 Jan 2026 20:45:14 +0100 Subject: [PATCH 3/4] nixos/icecast: modernize and clean up --- nixos/modules/services/audio/icecast.nix | 66 +++++++++++++----------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/nixos/modules/services/audio/icecast.nix b/nixos/modules/services/audio/icecast.nix index 930b6af004a2..feb78ca8fc5c 100644 --- a/nixos/modules/services/audio/icecast.nix +++ b/nixos/modules/services/audio/icecast.nix @@ -5,8 +5,14 @@ ... }: let + inherit (lib) + mkRemovedOptionModule + mkRenamedOptionModule + ; + cfg = config.services.icecast; configFile = pkgs.writeText "icecast.xml" '' + ${cfg.hostname} @@ -16,7 +22,7 @@ let - ${cfg.logDir} + /var/log/icecast ${pkgs.icecast}/share/icecast/admin ${pkgs.icecast}/share/icecast/web @@ -29,18 +35,27 @@ let 0 - - ${cfg.user} - ${cfg.group} - - ${cfg.extraConf} + ${cfg.extraConfig} ''; in { + imports = [ + (mkRemovedOptionModule [ "services" "icecast" "logDir" ] '' + The log directory is now managed by systemd's LogsDirectory= directive. + '') + (mkRemovedOptionModule [ "services" "icecast" "user" ] '' + The service now runs under the dynamically allocated `icecast` user. + '') + (mkRemovedOptionModule [ "services" "icecast" "group" ] '' + The service now runs under the dynamically allocated `icecast` group. + '') + (mkRenamedOptionModule [ "services" "icecast" "extraConf" ] [ "services" "icecast" "extraConfig" ]) + ]; + ###### interface options = { @@ -69,12 +84,6 @@ in }; }; - logDir = lib.mkOption { - type = lib.types.path; - description = "Base directory used for logging."; - default = "/var/log/icecast"; - }; - listen = { port = lib.mkOption { type = lib.types.port; @@ -89,22 +98,12 @@ in }; }; - user = lib.mkOption { - type = lib.types.str; - description = "User privileges for the server."; - default = "nobody"; - }; - - group = lib.mkOption { - type = lib.types.str; - description = "Group privileges for the server."; - default = "nogroup"; - }; - - extraConf = lib.mkOption { + extraConfig = lib.mkOption { type = lib.types.lines; - description = "icecast.xml content."; default = ""; + description = '' + Extra configuration added to {file}`icecast.xml` inside the `` element. + ''; }; }; @@ -120,11 +119,20 @@ in description = "Icecast Network Audio Streaming Server"; wantedBy = [ "multi-user.target" ]; - preStart = "mkdir -p ${cfg.logDir} && chown ${cfg.user}:${cfg.group} ${cfg.logDir}"; serviceConfig = { Type = "simple"; - ExecStart = "${pkgs.icecast}/bin/icecast -c ${configFile}"; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; + DynamicUser = true; + ExecStart = toString [ + (lib.getExe pkgs.icecast) + "-c" + configFile + ]; + ExecReload = toString [ + (lib.getExe' pkgs.coreutils "kill") + "-HUP" + "$MAINPID" + ]; + LogsDirectory = "icecast"; }; }; From f120a508681e5582eacf712f9460036d2daef345 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 1 Jan 2026 20:47:28 +0100 Subject: [PATCH 4/4] nixos/tests/icecast: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/icecast.nix | 25 +++++++++++++++++++++++++ pkgs/by-name/ic/icecast/package.nix | 5 +++++ 3 files changed, 31 insertions(+) create mode 100644 nixos/tests/icecast.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 4edc8777cf16..be7df9027bb4 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -748,6 +748,7 @@ in hydra = runTest ./hydra; i18n = runTest ./i18n.nix; i3wm = runTest ./i3wm.nix; + icecast = runTest ./icecast.nix; icingaweb2 = runTest ./icingaweb2.nix; ifm = runTest ./ifm.nix; ifstate = import ./ifstate { inherit runTest; }; diff --git a/nixos/tests/icecast.nix b/nixos/tests/icecast.nix new file mode 100644 index 000000000000..bb6652e8ecf8 --- /dev/null +++ b/nixos/tests/icecast.nix @@ -0,0 +1,25 @@ +{ + pkgs, + ... +}: + +{ + name = "icecast"; + meta = { + inherit (pkgs.icecast.meta) maintainers; + }; + + nodes.machine = { + services.icecast = { + enable = true; + hostname = "nixos.test"; + admin.password = "test"; + }; + }; + + testScript = '' + machine.wait_for_unit("icecast.service") + machine.wait_for_open_port(8000) + machine.succeed("curl -fail http://localhost:8000 | grep -q 'DO NOT ATTEMPT TO PARSE ICECAST HTML OUTPUT'") + ''; +} diff --git a/pkgs/by-name/ic/icecast/package.nix b/pkgs/by-name/ic/icecast/package.nix index 1c67acf92add..770ce90b5f8c 100644 --- a/pkgs/by-name/ic/icecast/package.nix +++ b/pkgs/by-name/ic/icecast/package.nix @@ -13,6 +13,7 @@ libxslt, rhash, speex, + nixosTests, }: stdenv.mkDerivation (finalAttrs: { @@ -39,6 +40,10 @@ stdenv.mkDerivation (finalAttrs: { speex ]; + passthru.tests = { + inherit (nixosTests) icecast; + }; + meta = { description = "Server software for streaming multimedia"; mainProgram = "icecast";