Add gilgamesh NixOS config and spigot-server package
Check / Lint Ansible Files (push) Successful in 2m18s
Check / Lint Ansible Files (push) Successful in 2m18s
This commit is contained in:
@@ -0,0 +1 @@
|
||||
spigot-1.20.1.jar
|
||||
@@ -0,0 +1,11 @@
|
||||
# Packages
|
||||
|
||||
## `spigot-server`
|
||||
|
||||
In order to build `spigot-server.nix` you'll need a copy of the Spigot JAR.
|
||||
For licensing reasons I won't check it into Git.
|
||||
Just drop `spigot-${version}.jar` into this folder and change the `version = ` line in `spigot-server.nix` accordingly.
|
||||
|
||||
## TODO
|
||||
|
||||
- Make some more stuff in `spigot-server.nix` configurable
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
makeWrapper,
|
||||
stdenv,
|
||||
# Runtime Dependencies
|
||||
jre
|
||||
}:
|
||||
let
|
||||
# Copied from some forum thread without much thought.
|
||||
# Let's see if they work out.
|
||||
javaFlags = "-Xmx5G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=50 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "spigot-server";
|
||||
version = "1.20.1";
|
||||
src = ./spigot-${version}.jar;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
install -Dm644 $src $out/lib/spigot-${version}.jar
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${jre}/bin/java $out/bin/spigot-server \
|
||||
--argv0 spigot-server \
|
||||
--add-flags "${javaFlags}" \
|
||||
--add-flags "-jar $out/lib/spigot-${version}.jar"
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user