1 { pkgs, lib, stdenv, makeDesktopItem, fetchurl, unzip, makeWrapper, xorg, jre, }:
3 stdenv.mkDerivation rec {
8 url = "https://github.com/runelite/launcher/releases/download/${version}/RuneLite.jar";
9 sha256 = "4BX188QIjIFTxng2ktqlKn7AqQ9tdBcKWmgOj/5yd10=";
13 url = "https://github.com/runelite/launcher/raw/${version}/appimage/runelite.png";
14 sha256 = "04fcjm7p546gr82g0jbh497j7rnh70lrvas0k171bff4v3knrjw1";
17 # The `.so` files provided by these two jars aren't detected by RuneLite for some reason, so we have to provide them manually
19 url = "https://repo.runelite.net/net/runelite/jogl/jogl-all/2.4.0-rc-20200429/jogl-all-2.4.0-rc-20200429-natives-linux-amd64.jar";
20 sha256 = "S60qxyWY9RfyhLFygn/OxZFWnc8qVRtTFdWMbdu+2U0=";
23 url = "https://repo.runelite.net/net/runelite/gluegen/gluegen-rt/2.4.0-rc-20200429/gluegen-rt-2.4.0-rc-20200429-natives-linux-amd64.jar";
24 sha256 = "eF8S5sQkJFDtW8rcVBKIyeyKm5Ze5rXK5r/yosZcHjU=";
28 desktop = makeDesktopItem {
33 comment = "Open source Old School RuneScape client";
34 desktopName = "RuneLite";
35 genericName = "Oldschool Runescape";
36 categories = [ "Game" ];
39 nativeBuildInputs = [ makeWrapper unzip ];
41 mkdir -p $out/share/runelite
42 mkdir -p $out/share/applications
45 unzip ${jogl} 'natives/*' -d $out
46 unzip ${gluegen} 'natives/*' -d $out
48 ln -s ${jar} $out/share/runelite/RuneLite.jar
49 ln -s ${desktop}/share/applications/RuneLite.desktop $out/share/applications/RuneLite.desktop
51 # RuneLite looks for `.so` files in $PWD/natives, so ensure that we set the PWD to the right place
52 makeWrapper ${jre}/bin/java $out/bin/runelite \
54 --prefix LD_LIBRARY_PATH : "${xorg.libXxf86vm}/lib" \
55 --add-flags "-jar $out/share/runelite/RuneLite.jar"
59 description = "Open source Old School RuneScape client";
60 homepage = "https://runelite.net/";
61 sourceProvenance = with sourceTypes; [
65 license = licenses.bsd2;
66 maintainers = with maintainers; [ kmeakin ];
67 platforms = [ "x86_64-linux" ];