1 { lib, stdenv, fetchurl, nixosTests, jre_headless, version, url, sha1 }:
3 pname = "minecraft-server";
6 src = fetchurl { inherit url sha1; };
8 preferLocalBuild = true;
11 mkdir -p $out/bin $out/lib/minecraft
12 cp -v $src $out/lib/minecraft/server.jar
14 cat > $out/bin/minecraft-server << EOF
16 exec ${jre_headless}/bin/java \$@ -jar $out/lib/minecraft/server.jar nogui
19 chmod +x $out/bin/minecraft-server
25 tests = { inherit (nixosTests) minecraft-server; };
26 updateScript = ./update.py;
30 description = "Minecraft Server";
31 homepage = "https://minecraft.net";
32 sourceProvenance = with sourceTypes; [ binaryBytecode ];
33 license = licenses.unfreeRedistributable;
34 platforms = platforms.unix;
35 maintainers = with maintainers; [ thoughtpolice tomberek costrouc joelkoen ];