Attempt to make Forge install succeed for newer MC server versions

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-07-27 21:05:20 +02:00
parent c76c746dce
commit c949d4638a
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -71,9 +71,15 @@ in
'';
installPhase = ''
mkdir bin
ln -s ${pkgs.writeShellScript "noop" ''echo "cd $PWD ; java $@" > install-forge''} bin/java
export PATH=$PWD/bin:$PATH
mkdir ebin $out
cat > ebin/java <<EOF
#!$(which sh)
echo "cd \$PWD && java \$@" > install-forge
EOF
chmod +x ebin/java
export PATH=$PWD/ebin:$PATH
./modpacks.ch ${toString cfg.modpackId} ${toString cfg.versionId} --nojava --path $out --verbose
'';