2 seed = "2151901553968352745";
5 in import ./make-test-python.nix ({ pkgs, ... }: {
6 name = "minecraft-server";
7 meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; };
9 nodes.server = { ... }: {
10 environment.systemPackages = [ pkgs.mcrcon ];
12 nixpkgs.config.allowUnfree = true;
14 services.minecraft-server = {
22 generate-structures = false;
24 "rcon.password" = rcon-pass;
25 "rcon.port" = rcon-port;
29 virtualisation.memorySize = 2047;
33 server.wait_for_unit("minecraft-server")
34 server.wait_for_open_port(${toString rcon-port})
35 assert "${seed}" in server.succeed(
36 "mcrcon -H localhost -P ${toString rcon-port} -p '${rcon-pass}' -c 'seed'"
38 server.succeed("systemctl stop minecraft-server")