Change:
<del> { stdenv, fetchurl, makeDesktopItem, makeWrapper , jdk, jre, libpulseaudio, libXxf86vm </del> <ins> { 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 , gtk2-x11 , gdk-pixbuf , glib , curl , freetype , libpulseaudio , systemd , flite ? null , libXxf86vm ? null </ins> }: let desktopItem = makeDesktopItem { <del> name = "minecraft"; exec = "minecraft"; icon = "minecraft"; comment = "A sandbox-building game"; desktopName = "Minecraft"; genericName = "minecraft"; categories = "Game;"; </del> <ins> name = "minecraft-launcher"; exec = "minecraft-launcher"; icon = "minecraft-launcher"; comment = "Official launcher for Minecraft, a sandbox-building game"; desktopName = "Minecraft Launcher"; categories = "Game;Application;"; </ins> }; <del> libPath = stdenv.lib.makeLibraryPath [ libpulseaudio libXxf86vm # Needed only for versions <1.13 ]; </del> <ins> envLibPath = stdenv.lib.makeLibraryPath [ curl libpulseaudio systemd alsaLib # needed for narrator flite # needed for narrator libXxf86vm # needed only for versions <1.13 ]; </ins> <del> in stdenv.mkDerivation { name = "minecraft-2015-07-24"; </del> <ins> libPath = stdenv.lib.makeLibraryPath ([ alsaLib atk cairo cups dbus expat fontconfig freetype gdk-pixbuf glib gnome2.GConf gnome2.pango 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"; version = "2.1.5965"; </ins> src = fetchurl { <del> url = "https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar"; sha256 = "04pj4l5q0a64jncm2kk45r7nxnxa2z9n110dcxbbahdi6wk0png8"; </del> <ins> url = "https://launcher.mojang.com/download/linux/x86_64/minecraft-launcher_${version}.tar.gz"; sha256 = "0wlc49s541li4cbxdmlw8fp34hp1q9m6ngr7l5hfdhv1i13s5845"; }; icon = fetchurl { url = "https://launcher.mojang.com/download/minecraft-launcher.svg"; sha256 = "0w8z21ml79kblv20wh5lz037g130pxkgs8ll9s3bi94zn2pbrhim"; </ins> }; nativeBuildInputs = [ makeWrapper ]; <del> unpackPhase = "${jdk}/bin/jar xf $src favicon.png"; </del> <ins> sourceRoot = "."; dontConfigure = true; dontBuild = true; </ins> installPhase = '' <del> mkdir -p $out/bin $out/share/minecraft </del> <ins> mkdir -p $out/opt mv minecraft-launcher $out/opt </ins> <del> makeWrapper ${jre}/bin/java $out/bin/minecraft  --add-flags "-jar $out/share/minecraft/minecraft.jar"  --suffix LD_LIBRARY_PATH : ${libPath} </del> <ins> ${desktopItem.buildCommand} install -D $icon $out/share/icons/hicolor/symbolic/apps/minecraft-launcher.svg </ins> <del> cp $src $out/share/minecraft/minecraft.jar cp -r ${desktopItem}/share/applications $out/share install -D favicon.png $out/share/icons/hicolor/32x32/apps/minecraft.png </del> <ins> 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 </ins> ''; meta = with stdenv.lib; { <del> description = "A sandbox-building game"; homepage = https://minecraft.net; </del> <ins> description = "Official launcher for Minecraft, a sandbox-building game"; homepage = "https://minecraft.net"; </ins> maintainers = with maintainers; [ cpages ryantm infinisil ]; <del> license = licenses.unfreeRedistributable; </del> <ins> license = licenses.unfree; </ins> }; <ins> passthru.updateScript = ./update.sh; </ins> }

Discussion:
Describe the bug Upon pressing the "Play" button in the Minecraft launcher, the button is then stuck in the "Preparing..." phase. To Reproduce Steps to reproduce the behavior: the launcher in if you haven't logged in yet Play Additional context This is what is shown in the log: From what I have seen on the Internet, this happens when the launcher is outdated, so there is that. I will tag since he was the last one who fixed an issue related to the launcher. EDIT: might be a good time to mention that I am nearly sure this isn't an issue with my computer. Just a few hours ago, I was playing Minecraft just fine. Now it's giving me this error, without generation changes nor reboots nor whatever. I even tried deleting the entire Minecraft folder and rebooted to get a fresh install, but it's still happening.
Yeah I can't launch either, and it doesn't seem to be a NixOS-specific problem, there's many more people having the same problem: , also a bug report at (which was closed with Invalid??) Anyways from the thread there it seems to indicate we finally need to update our launcher. The one we use in NixOS is like at least 4 years old, even though a new one has been release for a while.
The officially provided .deb file includes the icon but I can't find a URL that would point to a fixed version of it (which is available for the general package, but that does not include the icons) - we can't add copyrighted material to the repo or have the build fail because a new version is released and the hash doesn't match anymore, and I would like to not have to pull the AUR repo. cc
I previously sent unpolished derivations for both the new Minecraft launcher and a launcher for running Minecraft-PE to 2 months ago. Here's a link to an archive for the derivations: (Note that it's is a despite the filename) If you are curious about the Minecraft-PE launcher it essentially uses the x86 version of Minecraft-PE so that you can run it. This is useful if you want to use the Bedrock version of the game. If you are unaware there are two main ecosystems for Minecraft, Java Edition (the original) and Bedrock Edition (multiplatform W10, Android, iOS, switch, xbox one, etc).

A bit off-topic - MultiMC launcher seems to work fine (and I consider it a better launcher :D). EDIT: I meant compared to the official launcher of course!
Right. This is interesting. If you are making binary packages and putting them on a repo, you are technically breaking copyright law. So, that flatpak thing? Illegal. Avoid it. I just don't have the heart to forward it to enforcement. We could totally put the icon somewhere so you can grab it and use it.
Perhaps you meant to comment in I'm just noticing that while nixpkgs doesn't use the Flatpak thing, we still had the intention of providing a prebuilt package for the launcher. Because of however, this never actually worked. I'll make sure that in above PR we switch from as a license to such that no altered version will ever be provided by the build servers, so users will continue to have to let their machine patch it locally. Having the icon at a fixed url would be great yeah (preferably a versioned url in case it ever changes), or even included in (probably won't work well because of its structure though). Nice to have someone from the Mojang team here :D
Having the fetchable at a fixed url would be great also.