1 { lib, stdenv, fetchurl, nixosTests, jre_headless, makeWrapper, udev, version, url, sha1 }:
3 pname = "minecraft-server";
6 src = fetchurl { inherit url sha1; };
8 preferLocalBuild = true;
10 nativeBuildInputs = [ makeWrapper ];
15 install -Dm644 $src $out/lib/minecraft/server.jar
17 makeWrapper ${lib.getExe jre_headless} $out/bin/minecraft-server \
18 --append-flags "-jar $out/lib/minecraft/server.jar nogui" \
19 ${lib.optionalString stdenv.hostPlatform.isLinux "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}"}
27 tests = { inherit (nixosTests) minecraft-server; };
28 updateScript = ./update.py;
32 description = "Minecraft Server";
33 homepage = "https://minecraft.net";
34 sourceProvenance = with sourceTypes; [ binaryBytecode ];
35 license = licenses.unfreeRedistributable;
36 platforms = platforms.unix;
37 maintainers = with maintainers; [ thoughtpolice tomberek costrouc ];