-
-
Save joepie91/6b98de6c727b3e5f57960586b465947a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, xorg, openjdk, mesa, openal, jre, ... }: | |
stdenv.mkDerivation { | |
name = "ftb"; | |
src = ./FTB_Launcher.jar; | |
buildInputs = with xorg; [ libX11 libXext libXcursor libXrandr libXxf86vm openjdk mesa openal ]; | |
buildCommand = '' | |
mkdir -pv $out/libexec/ $out/bin/ | |
cp -v $src $out/libexec/FTB_Launcher.jar | |
RESULT= | |
for x in $nativeBuildInputs; do | |
RESULT=$x/lib/:$RESULT | |
done | |
cat <<EOF > $out/bin/ftb | |
#!${stdenv.shell} | |
export LD_LIBRARY_PATH=$RESULT | |
export GAME_LIBRARY_PATH=$RESULT | |
exec ${jre}/bin/java -jar $out/libexec/FTB_Launcher.jar | |
EOF | |
chmod +x $out/bin/ftb | |
''; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, xorg, jdk, mesa, openal, libpulseaudio, ... }: | |
stdenv.mkDerivation { | |
name = "technic"; | |
src = ./TechnicLauncher.jar; | |
buildInputs = with xorg; [ libX11 libXext libXcursor libXrandr libXxf86vm jdk mesa openal libpulseaudio ]; | |
buildCommand = '' | |
mkdir -pv $out/libexec/ $out/bin/ | |
cp -v $src $out/libexec/TechnicLauncher.jar | |
RESULT= | |
for x in $buildInputs; do | |
RESULT=$x/lib/:$RESULT | |
done | |
cat <<EOF > $out/bin/technic | |
#!${stdenv.shell} | |
export LD_LIBRARY_PATH=/run/opengl-driver/lib:$RESULT | |
export GAME_LIBRARY_PATH=/run/opengl-driver/lib:$RESULT | |
exec ${jdk}/bin/java -jar $out/libexec/TechnicLauncher.jar | |
EOF | |
chmod +x $out/bin/technic | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment