1 { lib, stdenv, fetchurl, bash, jre }:
6 url = "https://papermc.io/api/v2/projects/paper/versions/${mcVersion}/builds/${buildNum}/downloads/paper-${mcVersion}-${buildNum}.jar";
7 sha256 = "sha256-y7+bByWPc/2KBG/DOX/CFsIQWNboJs68++6Y64lyVt4=";
9 in stdenv.mkDerivation {
11 version = "${mcVersion}r${buildNum}";
13 preferLocalBuild = true;
19 cat > minecraft-server << EOF
21 exec ${jre}/bin/java \$@ -jar $out/share/papermc/papermc.jar nogui
25 install -Dm444 ${jar} $out/share/papermc/papermc.jar
26 install -Dm555 -t $out/bin minecraft-server
30 description = "High-performance Minecraft Server";
31 homepage = "https://papermc.io/";
32 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
33 license = lib.licenses.gpl3Only;
34 platforms = lib.platforms.unix;
35 maintainers = with lib.maintainers; [ aaronjanse neonfuz ];
36 mainProgram = "minecraft-server";