1 { stdenv, lib, buildFHSUserEnv, dpkg, glibc, gcc-unwrapped, autoPatchelfHook, fetchurl, wrapGAppsHook
3 , libSM, libXxf86vm, libX11, glib, pango, cairo, gtk2-x11, zlib, openssl
5 , SDL2, xorg_sys_opengl, libGL
9 runescape = stdenv.mkDerivation rec {
10 pname = "runescape-launcher";
13 # Packages: https://content.runescape.com/downloads/ubuntu/dists/trusty/non-free/binary-amd64/Packages
14 # upstream is https://content.runescape.com/downloads/ubuntu/pool/non-free/r/${pname}/${pname}_${version}_amd64.deb
16 url = "https://archive.org/download/${pname}_${version}_amd64/${pname}_${version}_amd64.deb";
17 sha256 = "1zilpxh8k8baylbl9nqq9kgjiv2xzw4lizbgcmzky5rhmych8n4g";
40 runtimeDependencies = [
55 envVarsWithXmodifiers = ''
56 export MESA_GLSL_CACHE_DIR=~/Jagex
62 mkdir -p $out/bin $out/share
65 patchShebangs $out/usr/bin/runescape-launcher
66 substituteInPlace $out/usr/bin/runescape-launcher \
67 --replace "unset XMODIFIERS" "$envVarsWithXmodifiers" \
68 --replace "/usr/share/games/runescape-launcher/runescape" "$out/share/games/runescape-launcher/runescape"
70 cp -r $out/usr/bin $out/
71 cp -r $out/usr/share $out/
78 description = "Launcher for RuneScape 3, the current main RuneScape";
79 homepage = "https://www.runescape.com/";
80 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
81 license = licenses.unfree;
82 maintainers = with maintainers; [ grburst ];
83 platforms = [ "x86_64-linux" ];
90 * We can patch the runescape launcher, but it downloads a client at runtime and checks it for changes.
91 * For that we need use a buildFHSUserEnv.
92 * FHS simulates a classic linux shell
98 dpkg glibc gcc-unwrapped
99 libSM libXxf86vm libX11 glib pango cairo gtk2-x11 zlib openssl
102 SDL2 xorg_sys_opengl libGL
104 multiPkgs = pkgs: [ libGL ];
105 runScript = "runescape-launcher";
106 extraInstallCommands = ''
107 mkdir -p "$out/share/applications"
108 cp ${runescape}/share/applications/runescape-launcher.desktop "$out/share/applications"
109 cp -r ${runescape}/share/icons "$out/share/icons"
110 substituteInPlace "$out/share/applications/runescape-launcher.desktop" \
111 --replace "/usr/bin/runescape-launcher" "RuneScape"
115 description = "RuneScape Game Client (NXT) - Launcher for RuneScape 3";
116 homepage = "https://www.runescape.com/";
117 license = licenses.unfree;
118 maintainers = with maintainers; [ grburst ];
119 platforms = [ "x86_64-linux" ];