1 { lib, stdenv, fetchurl, nixosTests, jre_headless, makeWrapper }:
3 stdenv.mkDerivation rec {
5 version = "1.19.2r1763";
8 url = "https://api.purpurmc.org/v2/purpur/${builtins.replaceStrings [ "r" ] [ "/" ] version}/download";
9 sha256 = "sha256-6wcCwVIGV32YQlgB57qthy6uWtuXGN4G8S7uAAgVyDE=";
12 nativeBuildInputs = [ makeWrapper ];
14 preferLocalBuild = true;
17 mkdir -p $out/bin $out/lib/minecraft
18 cp -v $src $out/lib/minecraft/server.jar
20 makeWrapper ${jre_headless}/bin/java $out/bin/minecraft-server \
21 --add-flags "-jar $out/lib/minecraft/server.jar nogui"
27 tests = { inherit (nixosTests) minecraft-server; };
31 description = "A drop-in replacement for Minecraft Paper servers";
33 Purpur is a drop-in replacement for Minecraft Paper servers designed for configurability, new fun and exciting
34 gameplay features, and performance built on top of Airplane.
36 homepage = "https://purpurmc.org/";
37 sourceProvenance = with sourceTypes; [ binaryBytecode ];
38 license = licenses.mit;
39 platforms = platforms.unix;
40 maintainers = with maintainers; [ joelkoen ];
41 mainProgram = "minecraft-server";