2021-12-11 10:42:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, nixosTests, jre_headless, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "purpur";
|
2022-08-24 18:42:28 +00:00
|
|
|
version = "1.19.2r1763";
|
2021-12-11 10:42:56 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://api.purpurmc.org/v2/purpur/${builtins.replaceStrings [ "r" ] [ "/" ] version}/download";
|
2022-08-24 18:42:28 +00:00
|
|
|
sha256 = "sha256-6wcCwVIGV32YQlgB57qthy6uWtuXGN4G8S7uAAgVyDE=";
|
2021-12-11 10:42:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/lib/minecraft
|
|
|
|
cp -v $src $out/lib/minecraft/server.jar
|
|
|
|
|
|
|
|
makeWrapper ${jre_headless}/bin/java $out/bin/minecraft-server \
|
|
|
|
--add-flags "-jar $out/lib/minecraft/server.jar nogui"
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tests = { inherit (nixosTests) minecraft-server; };
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A drop-in replacement for Minecraft Paper servers";
|
|
|
|
longDescription = ''
|
|
|
|
Purpur is a drop-in replacement for Minecraft Paper servers designed for configurability, new fun and exciting
|
|
|
|
gameplay features, and performance built on top of Airplane.
|
|
|
|
'';
|
|
|
|
homepage = "https://purpurmc.org/";
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2021-12-11 10:42:56 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
2023-01-15 04:14:19 +00:00
|
|
|
maintainers = with maintainers; [ joelkoen ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "minecraft-server";
|
2021-12-11 10:42:56 +00:00
|
|
|
};
|
|
|
|
}
|