diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index a144acc38666..5560980df10d 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1062,6 +1062,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 000000000000..7bd4413d7286 --- /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 842fbb7015b4..1eb46a3a4b99 100644 --- a/pkgs/servers/tt-rss/default.nix +++ b/pkgs/servers/tt-rss/default.nix @@ -1,4 +1,9 @@ -{ lib, stdenv, fetchgit }: +{ + lib, + stdenv, + fetchgit, + nixosTests, +}: stdenv.mkDerivation rec { pname = "tt-rss"; @@ -23,11 +28,18 @@ stdenv.mkDerivation rec { runHook postInstall ''; + passthru = { + inherit (nixosTests) tt-rss; + }; + 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; [ + globin + zohl + ]; platforms = platforms.all; }; }