Skip to content

Commit 70145b7

Browse files
authored
Update TT-RSS, add simple test and updater flag customization (#356592)
2 parents d3a91c2 + 7baea17 commit 70145b7

File tree

4 files changed

+56
-7
lines changed

4 files changed

+56
-7
lines changed

nixos/modules/services/web-apps/tt-rss.nix

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,17 @@ let
512512
'';
513513
};
514514

515+
updateDaemon = {
516+
commandFlags = mkOption {
517+
type = types.str;
518+
default = "--quiet";
519+
description = ''
520+
Command-line flags passed to the update daemon.
521+
The default --quiet flag mutes all logging, including errors.
522+
'';
523+
};
524+
};
525+
515526
extraConfig = mkOption {
516527
type = types.lines;
517528
default = "";
@@ -622,7 +633,7 @@ let
622633
serviceConfig = {
623634
User = "${cfg.user}";
624635
Group = "tt_rss";
625-
ExecStart = "${phpPackage}/bin/php ${cfg.root}/www/update.php --daemon --quiet";
636+
ExecStart = "${phpPackage}/bin/php ${cfg.root}/www/update.php --daemon ${cfg.updateDaemon.commandFlags}";
626637
Restart = "on-failure";
627638
RestartSec = "60";
628639
SyslogIdentifier = "tt-rss";

nixos/tests/all-tests.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,7 @@ in {
10951095
trilium-server = handleTestOn ["x86_64-linux"] ./trilium-server.nix {};
10961096
tsm-client-gui = handleTest ./tsm-client-gui.nix {};
10971097
ttyd = handleTest ./web-servers/ttyd.nix {};
1098+
tt-rss = handleTest ./web-apps/tt-rss.nix {};
10981099
txredisapi = handleTest ./txredisapi.nix {};
10991100
tuptime = handleTest ./tuptime.nix {};
11001101
turbovnc-headless-server = handleTest ./turbovnc-headless-server.nix {};

nixos/tests/web-apps/tt-rss.nix

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import ../make-test-python.nix (
2+
{ ... }:
3+
{
4+
name = "tt-rss-nixos";
5+
6+
nodes.machine =
7+
{ pkgs, ... }:
8+
{
9+
services.tt-rss = {
10+
enable = true;
11+
virtualHost = "localhost";
12+
selfUrlPath = "http://localhost/";
13+
singleUserMode = true;
14+
};
15+
};
16+
17+
testScript = ''
18+
machine.wait_for_unit("tt-rss.service")
19+
machine.succeed("curl -sSfL http://localhost/ | grep 'Tiny Tiny RSS'")
20+
'';
21+
}
22+
)

pkgs/servers/tt-rss/default.nix

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
{ lib, stdenv, fetchgit }:
1+
{
2+
lib,
3+
stdenv,
4+
fetchgit,
5+
nixosTests,
6+
unstableGitUpdater,
7+
}:
28

39
stdenv.mkDerivation rec {
410
pname = "tt-rss";
5-
version = "unstable-2023-04-13";
11+
version = "0-unstable-2024-11-04";
612

713
src = fetchgit {
814
url = "https://git.tt-rss.org/fox/tt-rss.git";
9-
rev = "0578bf802571781a0a7e3debbbec66437a7d28b4";
10-
hash = "sha256-j6R1QoH8SzUtyI3rGE6rHriboAfApAo/Guw8WbJ7LqU=";
15+
rev = "42ebdb027ec249fb8e693c41d7ee80ecdc68d6ec";
16+
hash = "sha256-QN7CwUufQSFlFde0NebO/kOYtEZCyL0ut+CNEpJMIMA=";
1117
};
1218

1319
installPhase = ''
@@ -18,16 +24,25 @@ stdenv.mkDerivation rec {
1824
1925
# see the code of Config::get_version(). you can check that the version in
2026
# the footer of the preferences pages is not UNKNOWN
21-
echo "23.04" > $out/version_static.txt
27+
echo "${version}" > $out/version_static.txt
2228
2329
runHook postInstall
2430
'';
2531

32+
passthru = {
33+
inherit (nixosTests) tt-rss;
34+
updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
35+
};
36+
2637
meta = with lib; {
2738
description = "Web-based news feed (RSS/Atom) aggregator";
2839
license = licenses.gpl2Plus;
2940
homepage = "https://tt-rss.org";
30-
maintainers = with maintainers; [ globin zohl ];
41+
maintainers = with maintainers; [
42+
gileri
43+
globin
44+
zohl
45+
];
3146
platforms = platforms.all;
3247
};
3348
}

0 commit comments

Comments
 (0)