5e7c2d6cef
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
36 lines
885 B
Nix
36 lines
885 B
Nix
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
buildGoModule rec {
|
|
pname = "minecraft-server-hibernation";
|
|
version = "2.5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gekware";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-b6LeqjIraIasHBpaVgy8esl4NV8rdBrfO7ewgeIocS8=";
|
|
};
|
|
|
|
vendorHash = null;
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
checkFlags =
|
|
let
|
|
skippedTests = [
|
|
# Disable tests requiring network access
|
|
"Test_getPing"
|
|
"Test_getReqType"
|
|
"Test_QueryBasic"
|
|
"Test_QueryFull"
|
|
];
|
|
in
|
|
[ "-skip" "${builtins.concatStringsSep "|" skippedTests}" ];
|
|
|
|
meta = with lib; {
|
|
description = "Autostart and stop minecraft-server when players join/leave";
|
|
homepage = "https://github.com/gekware/minecraft-server-hibernation";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ squarepear ];
|
|
};
|
|
}
|