diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix index 9826febb3c66f..ac67078367b27 100644 --- a/nixos/modules/services/web-apps/tt-rss.nix +++ b/nixos/modules/services/web-apps/tt-rss.nix @@ -512,6 +512,17 @@ let ''; }; + updateDaemon = { + commandFlags = mkOption { + type = types.str; + default = "--quiet"; + description = '' + Command-line flags passed to the update daemon. + The default --quiet flag mutes all logging, including errors. + ''; + }; + }; + extraConfig = mkOption { type = types.lines; default = ""; @@ -622,7 +633,7 @@ let serviceConfig = { User = "${cfg.user}"; Group = "tt_rss"; - ExecStart = "${phpPackage}/bin/php ${cfg.root}/www/update.php --daemon --quiet"; + ExecStart = "${phpPackage}/bin/php ${cfg.root}/www/update.php --daemon ${cfg.updateDaemon.commandFlags}"; Restart = "on-failure"; RestartSec = "60"; SyslogIdentifier = "tt-rss"; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 92033b7c58f6c..66c92771771dc 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1095,6 +1095,7 @@ in { trilium-server = handleTestOn ["x86_64-linux"] ./trilium-server.nix {}; tsm-client-gui = handleTest ./tsm-client-gui.nix {}; ttyd = handleTest ./web-servers/ttyd.nix {}; + tt-rss = handleTest ./web-apps/tt-rss.nix {}; txredisapi = handleTest ./txredisapi.nix {}; tuptime = handleTest ./tuptime.nix {}; turbovnc-headless-server = handleTest ./turbovnc-headless-server.nix {}; diff --git a/nixos/tests/web-apps/tt-rss.nix b/nixos/tests/web-apps/tt-rss.nix new file mode 100644 index 0000000000000..7bd4413d72868 --- /dev/null +++ b/nixos/tests/web-apps/tt-rss.nix @@ -0,0 +1,22 @@ +import ../make-test-python.nix ( + { ... }: + { + name = "tt-rss-nixos"; + + nodes.machine = + { pkgs, ... }: + { + services.tt-rss = { + enable = true; + virtualHost = "localhost"; + selfUrlPath = "http://localhost/"; + singleUserMode = true; + }; + }; + + testScript = '' + machine.wait_for_unit("tt-rss.service") + machine.succeed("curl -sSfL http://localhost/ | grep 'Tiny Tiny RSS'") + ''; + } +) diff --git a/pkgs/servers/tt-rss/default.nix b/pkgs/servers/tt-rss/default.nix index 842fbb7015b4b..b1b0c1d685276 100644 --- a/pkgs/servers/tt-rss/default.nix +++ b/pkgs/servers/tt-rss/default.nix @@ -1,13 +1,19 @@ -{ lib, stdenv, fetchgit }: +{ + lib, + stdenv, + fetchgit, + nixosTests, + unstableGitUpdater, +}: stdenv.mkDerivation rec { pname = "tt-rss"; - version = "unstable-2023-04-13"; + version = "0-unstable-2024-11-04"; src = fetchgit { url = "https://git.tt-rss.org/fox/tt-rss.git"; - rev = "0578bf802571781a0a7e3debbbec66437a7d28b4"; - hash = "sha256-j6R1QoH8SzUtyI3rGE6rHriboAfApAo/Guw8WbJ7LqU="; + rev = "42ebdb027ec249fb8e693c41d7ee80ecdc68d6ec"; + hash = "sha256-QN7CwUufQSFlFde0NebO/kOYtEZCyL0ut+CNEpJMIMA="; }; installPhase = '' @@ -18,16 +24,25 @@ stdenv.mkDerivation rec { # see the code of Config::get_version(). you can check that the version in # the footer of the preferences pages is not UNKNOWN - echo "23.04" > $out/version_static.txt + echo "${version}" > $out/version_static.txt runHook postInstall ''; + passthru = { + inherit (nixosTests) tt-rss; + updateScript = unstableGitUpdater { hardcodeZeroVersion = true; }; + }; + meta = with lib; { description = "Web-based news feed (RSS/Atom) aggregator"; license = licenses.gpl2Plus; homepage = "https://tt-rss.org"; - maintainers = with maintainers; [ globin zohl ]; + maintainers = with maintainers; [ + gileri + globin + zohl + ]; platforms = platforms.all; }; }