Merge pull request #11258 from cleverca22/multimc

multimc: init at 0.4.8

lethalman 1c8aceab ad2a4ab2

+81
+55
pkgs/games/multimc/default.nix
··· 1 + { stdenv, fetchFromGitHub, cmake, qt5Full, jdk7, zlib, file, makeWrapper, xorg, libpulseaudio }: 2 + 3 + let 4 + libnbt = fetchFromGitHub { 5 + owner = "MultiMC"; 6 + repo = "libnbtplusplus"; 7 + rev = "5d0ffb50a526173ce58ae57136bf5d79a7e1920d"; 8 + sha256 = "05hnwfb77rmm9ba7n96g4g1sgwqqcmplvbcafsl76yxr6ysgw5jg"; 9 + }; 10 + in 11 + stdenv.mkDerivation { 12 + name = "multimc-5"; 13 + src = fetchFromGitHub { 14 + owner = "MultiMC"; 15 + repo = "MultiMC5"; 16 + rev = "895d8ab4699f1b50bf03532c967a91f5ecb62a50"; 17 + sha256 = "179vc1iv57fx4g4h1wy8yvyvdm671jnvp6zi8pcr1n6azqhwklds"; 18 + }; 19 + buildInputs = [ cmake qt5Full jdk7 zlib file makeWrapper ]; 20 + 21 + libpath = with xorg; [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio ]; 22 + postUnpack = '' 23 + rmdir $sourceRoot/depends/libnbtplusplus 24 + cp -r ${libnbt} $sourceRoot/depends/libnbtplusplus 25 + chmod 755 -R $sourceRoot/depends/libnbtplusplus 26 + ''; 27 + 28 + patches = [ ./multimc.patch ]; 29 + 30 + enableParallelBuilding = true; 31 + 32 + # the install rule tries to bundle ALL deps into the output for portability 33 + installPhase = '' 34 + RESULT=/run/opengl-driver/lib/ 35 + for x in $libpath; do 36 + RESULT=$x/lib/:$RESULT 37 + done 38 + 39 + mkdir -pv $out/bin/jars $out/lib 40 + cp -v MultiMC $out/bin/ 41 + cp -v jars/*.jar $out/bin/jars/ 42 + cp -v librainbow.so libnbt++.so libMultiMC_logic.so $out/lib 43 + wrapProgram $out/bin/MultiMC --add-flags "-d \$HOME/.multimc/" --set GAME_LIBRARY_PATH $RESULT --prefix PATH : ${jdk7}/bin/ 44 + ''; 45 + 46 + meta = { 47 + homepage = https://multimc.org/; 48 + description = "A free, open source launcher for Minecraft"; 49 + longDescription = '' 50 + 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. 51 + ''; 52 + platforms = stdenv.lib.platforms.linux; 53 + license = stdenv.lib.licenses.lgpl21Plus; 54 + }; 55 + }
+24
pkgs/games/multimc/multimc.patch
··· 1 + diff -ur MultiMC5-895d8ab4699f1b50bf03532c967a91f5ecb62a50-src-orig/application/MultiMC.cpp MultiMC5-895d8ab4699f1b50bf03532c967a91f5ecb62a50-src/application/MultiMC.cpp 2 + --- MultiMC5-895d8ab4699f1b50bf03532c967a91f5ecb62a50-src-orig/application/MultiMC.cpp 2015-10-25 03:29:25.270126028 -0300 3 + +++ MultiMC5-895d8ab4699f1b50bf03532c967a91f5ecb62a50-src/application/MultiMC.cpp 2015-10-25 04:22:48.568437861 -0300 4 + @@ -330,7 +330,7 @@ 5 + } 6 + 7 + m_mmc_translator.reset(new QTranslator()); 8 + - if (m_mmc_translator->load("mmc_" + locale.bcp47Name(), staticDataPath + "/translations")) 9 + + if (m_mmc_translator->load("mmc_" + locale.bcp47Name(), "translations")) 10 + { 11 + qDebug() << "Loading MMC Language File for" 12 + << locale.bcp47Name().toLocal8Bit().constData() << "..."; 13 + diff -ur MultiMC5-895d8ab4699f1b50bf03532c967a91f5ecb62a50-src-orig/logic/Env.cpp MultiMC5-895d8ab4699f1b50bf03532c967a91f5ecb62a50-src/logic/Env.cpp 14 + --- MultiMC5-895d8ab4699f1b50bf03532c967a91f5ecb62a50-src-orig/logic/Env.cpp 2015-10-25 03:29:25.428124792 -0300 15 + +++ MultiMC5-895d8ab4699f1b50bf03532c967a91f5ecb62a50-src/logic/Env.cpp 2015-10-25 04:29:24.145412196 -0300 16 + @@ -147,7 +147,7 @@ 17 + m_metacache->addBase("general", QDir("cache").absolutePath()); 18 + m_metacache->addBase("skins", QDir("accounts/skins").absolutePath()); 19 + m_metacache->addBase("root", QDir(rootPath).absolutePath()); 20 + - m_metacache->addBase("translations", QDir(staticDataPath + "/translations").absolutePath()); 21 + + m_metacache->addBase("translations", QDir("translations").absolutePath()); 22 + m_metacache->addBase("icons", QDir("cache/icons").absolutePath()); 23 + m_metacache->Load(); 24 + }
+2
pkgs/top-level/all-packages.nix
··· 14022 14022 14023 14023 minecraft-server = callPackage ../games/minecraft-server { }; 14024 14024 14025 + multimc = callPackage ../games/multimc { }; 14026 + 14025 14027 minetest = callPackage ../games/minetest { 14026 14028 libpng = libpng12; 14027 14029 };