multimc: 0.6.4 -> 0.6.6

Use -DMultiMC_LAYOUT=lin-system to install shared object files to
$out/lib and the jars required at runtime to $out/share/multimc.
This commit is contained in:
Milan Pässler 2019-07-29 12:20:55 +02:00
parent cf82a58eae
commit c79aa36292

View File

@ -3,13 +3,13 @@
let
libpath = with xorg; stdenv.lib.makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio ];
in mkDerivation rec {
name = "multimc-${version}";
version = "0.6.4";
pname = "multimc";
version = "0.6.6";
src = fetchFromGitHub {
owner = "MultiMC";
repo = "MultiMC5";
rev = "0.6.4";
sha256 = "0z9mhvfsq9m2cmi0dbrjjc51642r6ppdbb8932236gar5j7w3bc2";
rev = version;
sha256 = "0a9ciqi73ihw17qmp8l5134py5gjjrdnrk50syl2mllsc1iqj4kf";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake file makeWrapper ];
@ -17,25 +17,18 @@ in mkDerivation rec {
enableParallelBuilding = true;
cmakeFlags = [ "-DMultiMC_LAYOUT=lin-system" ];
postInstall = ''
mkdir -p $out/share/{applications,pixmaps}
cp ../application/resources/multimc/scalable/multimc.svg $out/share/pixmaps
cp ../application/package/linux/multimc.desktop $out/share/applications
install -Dm644 ../application/resources/multimc/scalable/multimc.svg $out/share/pixmaps/multimc.svg
install -Dm755 ../application/package/linux/multimc.desktop $out/share/applications/multimc.desktop
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
wrapProgram $out/bin/MultiMC --add-flags "-d \$HOME/.multimc/" --set GAME_LIBRARY_PATH /run/opengl-driver/lib:${libpath} --prefix PATH : ${jdk}/bin/:${xorg.xrandr}/bin/
# MultiMC's CMakeLists.txt puts libraries in bin directory, causing them to be set executable, causing nixpkgs' wrapQtAppsHook to wrap them
chmod -x $out/bin/*.so
# As of https://github.com/MultiMC/MultiMC5/blob/7ea1d68244fdae1e7672fb84199ee71e168b31ca/application/package/linux/multimc.desktop,
# the desktop icon refers to `multimc`, but the executable actually gets
# installed as `MultiMC`. Create compatibility symlink to fix the desktop
# icon.
ln -sf $out/bin/MultiMC $out/bin/multimc
wrapProgram $out/bin/multimc --add-flags "-d \$HOME/.multimc/" --set GAME_LIBRARY_PATH /run/opengl-driver/lib:${libpath} --prefix PATH : ${jdk}/bin/:${xorg.xrandr}/bin/
'';
meta = with stdenv.lib; {
homepage = https://multimc.org/;
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.