2017-02-03 15:20:25 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, jdk, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase, quazip }:
|
2015-11-25 10:34:26 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
libnbt = fetchFromGitHub {
|
|
|
|
owner = "MultiMC";
|
|
|
|
repo = "libnbtplusplus";
|
|
|
|
rev = "5d0ffb50a526173ce58ae57136bf5d79a7e1920d";
|
|
|
|
sha256 = "05hnwfb77rmm9ba7n96g4g1sgwqqcmplvbcafsl76yxr6ysgw5jg";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "multimc-5";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MultiMC";
|
|
|
|
repo = "MultiMC5";
|
|
|
|
rev = "895d8ab4699f1b50bf03532c967a91f5ecb62a50";
|
|
|
|
sha256 = "179vc1iv57fx4g4h1wy8yvyvdm671jnvp6zi8pcr1n6azqhwklds";
|
|
|
|
};
|
2017-02-03 15:20:25 +00:00
|
|
|
buildInputs = [ cmake qtbase jdk zlib file makeWrapper ];
|
2015-11-25 10:34:26 +00:00
|
|
|
|
|
|
|
libpath = with xorg; [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio ];
|
|
|
|
postUnpack = ''
|
|
|
|
rmdir $sourceRoot/depends/libnbtplusplus
|
|
|
|
cp -r ${libnbt} $sourceRoot/depends/libnbtplusplus
|
|
|
|
chmod 755 -R $sourceRoot/depends/libnbtplusplus
|
2016-03-02 17:48:27 +00:00
|
|
|
mkdir -pv $sourceRoot/build/
|
2017-02-03 15:20:25 +00:00
|
|
|
cp -v ${quazip.src} $sourceRoot/build/quazip-0.7.1.tar.gz
|
2015-11-25 10:34:26 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [ ./multimc.patch ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
# the install rule tries to bundle ALL deps into the output for portability
|
|
|
|
installPhase = ''
|
|
|
|
RESULT=/run/opengl-driver/lib/
|
|
|
|
for x in $libpath; do
|
|
|
|
RESULT=$x/lib/:$RESULT
|
|
|
|
done
|
|
|
|
|
|
|
|
mkdir -pv $out/bin/jars $out/lib
|
|
|
|
cp -v MultiMC $out/bin/
|
2016-11-20 17:05:18 +00:00
|
|
|
cp -v jars/*.jar $out/bin/jars/ #*/
|
2015-11-25 10:34:26 +00:00
|
|
|
cp -v librainbow.so libnbt++.so libMultiMC_logic.so $out/lib
|
2016-12-29 01:33:39 +00:00
|
|
|
wrapProgram $out/bin/MultiMC --add-flags "-d \$HOME/.multimc/" --set GAME_LIBRARY_PATH $RESULT --prefix PATH : ${jdk}/bin/
|
2015-11-25 10:34:26 +00:00
|
|
|
'';
|
|
|
|
|
2016-11-20 17:05:18 +00:00
|
|
|
meta = with stdenv.lib; {
|
2015-11-25 10:34:26 +00:00
|
|
|
homepage = https://multimc.org/;
|
|
|
|
description = "A free, open source launcher for Minecraft";
|
|
|
|
longDescription = ''
|
|
|
|
Allows you to have multiple, separate instances of Minecraft (each with their own mods, texture packs, saves, etc) and helps you manage them and their associated options with a simple interface.
|
|
|
|
'';
|
2016-11-20 17:05:18 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = [ maintainers.cleverca22 ];
|
2015-11-25 10:34:26 +00:00
|
|
|
};
|
|
|
|
}
|