2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
, maven
|
|
|
|
, jre
|
|
|
|
, xorg
|
|
|
|
, gitUpdater
|
2024-01-02 11:29:13 +00:00
|
|
|
, libGL
|
2023-11-16 04:20:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
maven.buildMavenPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "runelite";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.6.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "runelite";
|
|
|
|
repo = "launcher";
|
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-lovDkEvzclZCBu/Ha8h0j595NZ4ejefEOX7lNmzb8I8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-11-16 04:20:00 +00:00
|
|
|
mvnHash = "sha256-iGnoAZcJvaVoACi9ozG/f+A8tjvDuwn22bMRyuUU5Jg=";
|
2021-06-01 10:57:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
desktop = makeDesktopItem {
|
|
|
|
name = "RuneLite";
|
|
|
|
type = "Application";
|
|
|
|
exec = "runelite";
|
2023-11-16 04:20:00 +00:00
|
|
|
icon = "runelite";
|
2020-04-24 23:36:52 +00:00
|
|
|
comment = "Open source Old School RuneScape client";
|
|
|
|
desktopName = "RuneLite";
|
|
|
|
genericName = "Oldschool Runescape";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Game" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# tests require internet :(
|
|
|
|
mvnParameters = "-Dmaven.test.skip";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-06-01 10:57:12 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/icons
|
2024-01-02 11:29:13 +00:00
|
|
|
mkdir -p $out/share/applications
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cp target/RuneLite.jar $out/share
|
|
|
|
cp appimage/runelite.png $out/share/icons
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
ln -s ${desktop}/share/applications/RuneLite.desktop $out/share/applications/RuneLite.desktop
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/runelite \
|
2024-01-02 11:29:13 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libXxf86vm libGL ]}" \
|
2023-11-16 04:20:00 +00:00
|
|
|
--add-flags "-jar $out/share/RuneLite.jar"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
|
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open source Old School RuneScape client";
|
|
|
|
homepage = "https://runelite.net/";
|
2023-11-16 04:20:00 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [
|
2022-06-26 10:26:21 +00:00
|
|
|
binaryBytecode
|
|
|
|
binaryNativeCode
|
|
|
|
];
|
2023-11-16 04:20:00 +00:00
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
maintainers = with lib.maintainers; [ kmeakin moody ];
|
2021-06-01 10:57:12 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "runelite";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|