mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
25 lines
499 B
Nix
25 lines
499 B
Nix
import ./make-test-python.nix ({ pkgs, ... }:
|
|
let
|
|
port = 50001;
|
|
in
|
|
{
|
|
name = "rtorrent";
|
|
meta = {
|
|
maintainers = with pkgs.lib.maintainers; [ thiagokokada ];
|
|
};
|
|
|
|
nodes.machine = { pkgs, ... }: {
|
|
services.rtorrent = {
|
|
inherit port;
|
|
enable = true;
|
|
};
|
|
};
|
|
|
|
testScript = /* python */ ''
|
|
machine.start()
|
|
machine.wait_for_unit("rtorrent.service")
|
|
machine.wait_for_open_port(${toString port})
|
|
|
|
machine.succeed("nc -z localhost ${toString port}")
|
|
'';
|
|
})
|