Put witchcraft plugin pkgs directly in the config.
This commit is contained in:
parent
323211c3b2
commit
2ae2a08c7e
@ -4,9 +4,20 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.fudo.minecraft-clj;
|
cfg = config.fudo.minecraft-clj;
|
||||||
|
|
||||||
papermcWithPlugins = pkgs.buildEnv {
|
witchcraft-plugin = let
|
||||||
name = "papermcWithPlugins";
|
pname = "witchcraft-plugin";
|
||||||
paths = with pkgs; [ papermc witchcraft-plugin-current ];
|
version = "0.7.37-for-paper-1.18-shaded";
|
||||||
|
in prev.stdenv.mkDerivation {
|
||||||
|
inherit pname version;
|
||||||
|
src = fetchurl {
|
||||||
|
url =
|
||||||
|
"https://github.com/lambdaisland/witchcraft-plugin/releases/download/v0.7.35/witchcraft-plugin-0.7.37-for-paper-1.18-shaded.jar";
|
||||||
|
sha256 = "0n85yc5ycq9qhl2cs8s3fkj4j8jvndaf8dq1avjr0l0l8bd27kzr";
|
||||||
|
};
|
||||||
|
phases = [ "installPhase" ];
|
||||||
|
installPhase = ''
|
||||||
|
cp $src $out
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
highMemFlags = [
|
highMemFlags = [
|
||||||
@ -212,6 +223,8 @@ in {
|
|||||||
cp -f ${admins-file} ${stateDir}/ops.txt
|
cp -f ${admins-file} ${stateDir}/ops.txt
|
||||||
cp -f ${props-file} ${stateDir}/server.properties
|
cp -f ${props-file} ${stateDir}/server.properties
|
||||||
cp -f ${eula-file} ${stateDir}/eula.txt
|
cp -f ${eula-file} ${stateDir}/eula.txt
|
||||||
|
mkdir -p ${stateDir}/plugins
|
||||||
|
cp ${witchcraft-plugin} ${stateDir}/plugins/witchcraft-plugin.jar
|
||||||
chmod u+w ${stateDir}/server.properties
|
chmod u+w ${stateDir}/server.properties
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -232,7 +245,7 @@ in {
|
|||||||
flags = commonFlags ++ memFlags
|
flags = commonFlags ++ memFlags
|
||||||
++ (optionals (worldOpts.allocated-memory >= 12) highMemFlags);
|
++ (optionals (worldOpts.allocated-memory >= 12) highMemFlags);
|
||||||
flagStr = concatStringsSep " " flags;
|
flagStr = concatStringsSep " " flags;
|
||||||
in "${papermcWithPlugins}/bin/minecraft-server ${flagStr}";
|
in "${pkgs.papermc}/bin/minecraft-server ${flagStr}";
|
||||||
|
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
NoNewPrivileges = true;
|
NoNewPrivileges = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user