Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { stdenv, fetchurl, makeDesktopItem
- , jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm
- , openjdk
- , libGLU_combined, openal
- , useAlsa ? false, alsaOss ? null }:
- with stdenv.lib;
- assert useAlsa -> alsaOss != null;
- let
- desktopItem = makeDesktopItem {
- name = "atlauncher";
- exec = "atlauncher";
- icon = "atlauncher";
- comment = "Free launcher for Minecraft that allows you to download modpacks.";
- desktopName = "ATLauncher";
- genericName = "atlauncher";
- categories = "Game;";
- };
- in stdenv.mkDerivation {
- name = "atlauncher-3.2.3.10";
- src = fetchurl {
- url = "https://download.nodecdn.net/containers/atl/ATLauncher.jar";
- sha256 = "0b5xi7jgydqrpz8dqgfbzrq4ijvl0269pci9qj4a6k5xkya45y1a";
- };
- phases = "installPhase";
- installPhase = ''
- set -x
- mkdir -pv $out/bin
- cp -v $src $out/ATLauncher.jar
- cat > $out/bin/atlauncher << EOF
- #!${stdenv.shell}
- export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libGLU_combined openal ]}
- ${if useAlsa then "${alsaOss}/bin/aoss" else "" } \
- ${jre}/bin/java -jar $out/ATLauncher.jar --working-dir "${XDG_DATA_HOME:-$HOME/.local/share}/atlauncher"
- EOF
- chmod +x $out/bin/atlauncher
- mkdir -p $out/share/applications
- ln -s ${desktopItem}/share/applications/* $out/share/applications/
- ${openjdk}/bin/jar xf $out/ATLauncher.jar assets/image/Icon.png
- install -D assets/image/Icon.png $out/share/icons/hicolor/32x32/apps/atlauncher.png
- '';
- meta = {
- description = "Free launcher for Minecraft that allows you to download modpacks.";
- homepage = http://atlauncher.com;
- maintainers = with stdenv.lib.maintainers; [ tenten8401 ];
- license = stdenv.lib.licenses.gnuGpl3;
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement