2019-09-05 23:23:51 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
, jre # old or modded versions of the game may require Java 8 (https://aur.archlinux.org/packages/minecraft-launcher/#pinned-674960)
|
|
|
|
, xorg
|
|
|
|
, zlib
|
|
|
|
, nss
|
|
|
|
, nspr
|
|
|
|
, fontconfig
|
|
|
|
, gnome2
|
|
|
|
, cairo
|
|
|
|
, expat
|
|
|
|
, alsaLib
|
|
|
|
, cups
|
|
|
|
, dbus
|
|
|
|
, atk
|
2019-10-26 22:55:05 +02:00
|
|
|
, gtk3-x11
|
2019-09-05 23:23:51 +02:00
|
|
|
, gtk2-x11
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
|
|
|
, curl
|
|
|
|
, freetype
|
|
|
|
, libpulseaudio
|
|
|
|
, systemd
|
|
|
|
, flite ? null
|
|
|
|
, libXxf86vm ? null
|
2018-07-19 00:05:53 +02:00
|
|
|
}:
|
2014-07-28 11:30:31 +02:00
|
|
|
|
2016-02-14 19:24:46 +01:00
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem {
|
2019-09-05 23:23:51 +02:00
|
|
|
name = "minecraft-launcher";
|
|
|
|
exec = "minecraft-launcher";
|
|
|
|
icon = "minecraft-launcher";
|
|
|
|
comment = "Official launcher for Minecraft, a sandbox-building game";
|
|
|
|
desktopName = "Minecraft Launcher";
|
|
|
|
categories = "Game;Application;";
|
2016-02-14 19:24:46 +01:00
|
|
|
};
|
|
|
|
|
2019-09-05 23:23:51 +02:00
|
|
|
envLibPath = stdenv.lib.makeLibraryPath [
|
|
|
|
curl
|
|
|
|
libpulseaudio
|
|
|
|
systemd
|
|
|
|
alsaLib # needed for narrator
|
|
|
|
flite # needed for narrator
|
|
|
|
libXxf86vm # needed only for versions <1.13
|
|
|
|
];
|
2018-12-01 23:56:01 +01:00
|
|
|
|
2019-09-05 23:23:51 +02:00
|
|
|
libPath = stdenv.lib.makeLibraryPath ([
|
|
|
|
alsaLib
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gnome2.GConf
|
|
|
|
gnome2.pango
|
2019-10-26 22:55:05 +02:00
|
|
|
gtk3-x11
|
2019-09-05 23:23:51 +02:00
|
|
|
gtk2-x11
|
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
stdenv.cc.cc
|
|
|
|
zlib
|
|
|
|
] ++
|
|
|
|
(with xorg; [
|
|
|
|
libX11
|
|
|
|
libxcb
|
|
|
|
libXcomposite
|
|
|
|
libXcursor
|
|
|
|
libXdamage
|
|
|
|
libXext
|
|
|
|
libXfixes
|
|
|
|
libXi
|
|
|
|
libXrandr
|
|
|
|
libXrender
|
|
|
|
libXtst
|
|
|
|
libXScrnSaver
|
|
|
|
]));
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "minecraft-launcher";
|
|
|
|
|
2019-10-26 22:55:05 +02:00
|
|
|
version = "2.1.7658";
|
2012-04-29 16:09:58 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-09-05 23:23:51 +02:00
|
|
|
url = "https://launcher.mojang.com/download/linux/x86_64/minecraft-launcher_${version}.tar.gz";
|
2019-10-26 22:55:05 +02:00
|
|
|
sha256 = "10sng7l0q9r98zwifjmy50nyh65ny4djmacz8158hffcsfcx93px";
|
2019-09-05 23:23:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
icon = fetchurl {
|
|
|
|
url = "https://launcher.mojang.com/download/minecraft-launcher.svg";
|
|
|
|
sha256 = "0w8z21ml79kblv20wh5lz037g130pxkgs8ll9s3bi94zn2pbrhim";
|
2012-04-29 16:09:58 +02:00
|
|
|
};
|
|
|
|
|
2018-07-19 00:05:53 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2012-04-29 16:09:58 +02:00
|
|
|
|
2019-09-05 23:23:51 +02:00
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
2012-04-29 16:09:58 +02:00
|
|
|
|
2018-07-19 00:05:53 +02:00
|
|
|
installPhase = ''
|
2019-09-05 23:23:51 +02:00
|
|
|
mkdir -p $out/opt
|
|
|
|
mv minecraft-launcher $out/opt
|
2016-02-14 19:24:46 +01:00
|
|
|
|
2019-09-05 23:23:51 +02:00
|
|
|
${desktopItem.buildCommand}
|
|
|
|
install -D $icon $out/share/icons/hicolor/symbolic/apps/minecraft-launcher.svg
|
2016-06-09 16:02:26 +02:00
|
|
|
|
2019-09-05 23:23:51 +02:00
|
|
|
makeWrapper $out/opt/minecraft-launcher/minecraft-launcher $out/bin/minecraft-launcher \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${envLibPath} \
|
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath [ jre ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
|
|
|
|
--set-rpath '$ORIGIN/'":${libPath}" \
|
|
|
|
$out/opt/minecraft-launcher/minecraft-launcher
|
|
|
|
patchelf \
|
|
|
|
--set-rpath '$ORIGIN/'":${libPath}" \
|
|
|
|
$out/opt/minecraft-launcher/libcef.so
|
|
|
|
patchelf \
|
|
|
|
--set-rpath '$ORIGIN/'":${libPath}" \
|
|
|
|
$out/opt/minecraft-launcher/liblauncher.so
|
2012-04-29 16:09:58 +02:00
|
|
|
'';
|
|
|
|
|
2018-07-19 00:05:53 +02:00
|
|
|
meta = with stdenv.lib; {
|
2019-09-05 23:23:51 +02:00
|
|
|
description = "Official launcher for Minecraft, a sandbox-building game";
|
|
|
|
homepage = "https://minecraft.net";
|
2018-07-19 00:05:53 +02:00
|
|
|
maintainers = with maintainers; [ cpages ryantm infinisil ];
|
2019-09-05 23:23:51 +02:00
|
|
|
license = licenses.unfree;
|
2012-04-29 16:09:58 +02:00
|
|
|
};
|
2019-09-05 23:23:51 +02:00
|
|
|
|
|
|
|
passthru.updateScript = ./update.sh;
|
2012-04-29 16:09:58 +02:00
|
|
|
}
|