forge-server: Fix issues caused by the installer's reproducibility #31
|
@ -67,7 +67,7 @@ in {
|
||||||
(pkgs.local.forge-server.override {
|
(pkgs.local.forge-server.override {
|
||||||
jre_headless = pkgs.jdk11_headless;
|
jre_headless = pkgs.jdk11_headless;
|
||||||
mods = pkgs.local.voor-kia;
|
mods = pkgs.local.voor-kia;
|
||||||
config = ./configs/minecraft/voor-kia/config;
|
modConfig = ./configs/minecraft/voor-kia/config;
|
||||||
defaultconfigs = ./configs/minecraft/voor-kia/defaultconfigs;
|
defaultconfigs = ./configs/minecraft/voor-kia/defaultconfigs;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib, stdenv, fetchurl, busybox, coreutils, jre_headless, runtimeShell
|
{ lib, stdenv, fetchurl, busybox, coreutils, jre_headless, runtimeShell
|
||||||
, mods ? null, config ? null, defaultconfigs ? null }:
|
, mods ? null, modConfig ? null, defaultconfigs ? null }:
|
||||||
|
|
||||||
let
|
let
|
||||||
name = "forge-server";
|
name = "forge-server";
|
||||||
|
@ -59,11 +59,11 @@ in stdenv.mkDerivation rec {
|
||||||
# Delete any previous config directories so that they can be updated
|
# Delete any previous config directories so that they can be updated
|
||||||
${busybox}/bin/rm -fr config defaultconfigs
|
${busybox}/bin/rm -fr config defaultconfigs
|
||||||
|
|
||||||
${lib.optionalString (config != null) ''
|
${lib.optionalString (modConfig != null) ''
|
||||||
# Copy the specified configs into the directory. Forge (and
|
# Copy the specified configs into the directory. Forge (and
|
||||||
# mods) will try to write here, so we cannot symlink.
|
# mods) will try to write here, so we cannot symlink.
|
||||||
${busybox}/bin/mkdir -p config
|
${busybox}/bin/mkdir -p config
|
||||||
${busybox}/bin/cp -r '${config}'/* config
|
${busybox}/bin/cp -r '${modConfig}'/* config
|
||||||
${busybox}/bin/chmod -R u+w config
|
${busybox}/bin/chmod -R u+w config
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue