2020-05-10 10:54:09 +00:00
|
|
|
import ./make-test-python.nix ({ lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
port = 42069;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "bazarr";
|
2021-08-08 17:11:45 +00:00
|
|
|
meta.maintainers = with maintainers; [ d-xo ];
|
2020-05-10 10:54:09 +00:00
|
|
|
|
|
|
|
nodes.machine =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.bazarr = {
|
|
|
|
enable = true;
|
|
|
|
listenPort = port;
|
|
|
|
};
|
2022-10-17 10:46:39 +00:00
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["unrar"];
|
2022-11-04 12:31:52 +00:00
|
|
|
# Workaround for https://github.com/morpheus65535/bazarr/issues/1983
|
|
|
|
# ("Crash when running without timezone info").
|
|
|
|
time.timeZone = "UTC";
|
2020-05-10 10:54:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_unit("bazarr.service")
|
2022-10-17 10:46:39 +00:00
|
|
|
machine.wait_for_open_port(${toString port})
|
2020-05-10 10:54:09 +00:00
|
|
|
machine.succeed("curl --fail http://localhost:${toString port}/")
|
|
|
|
'';
|
|
|
|
})
|