Skip to content

Instantly share code, notes, and snippets.

@cleverca22 cleverca22/FTB.nix Secret
Created Feb 22, 2019

Embed
What would you like to do?
{ stdenv, fetchurl, openjdk8, libX11, libXext, libXcursor, libXrandr, libXxf86vm
, mesa_glu, openal, alsaOss, pulseaudioFull, libXi, lib }:
assert openjdk8 ? architecture;
let java = openjdk8;
in
stdenv.mkDerivation {
name = "FTB";
src = ./FTB_Launcher.jar;
phases = "installPhase";
installPhase = ''
mkdir -pv $out/bin
cat > $out/bin/FTB << EOF
#!${stdenv.shell}
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${java.out}/lib/${java.architecture}/:${lib.makeLibraryPath [ libX11.out libXext.out libXcursor.out libXrandr.out libXxf86vm.out mesa_glu openal libXi.out ]}
export LD_PRELOAD=${openal}/lib/libopenal.so
#${pulseaudioFull}/bin/padsp
${java}/bin/java -jar $src
EOF
chmod +x $out/bin/FTB
'';
meta = {
description = "A modpack loader for Minecraft";
homepage = http://www.feed-the-beast.com/;
maintainers = [ stdenv.lib.maintainers.cleverca22 ];
license = stdenv.lib.licenses.unfreeRedistributable;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.