You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
634 B
Nix
26 lines
634 B
Nix
7 years ago
|
{ 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
|
||
|
'';
|
||
|
}
|