2023-11-07 22:15:37 +01:00
|
|
|
{ lib
|
2023-11-07 23:06:43 +01:00
|
|
|
, fetchFromGitHub
|
2023-11-07 22:15:37 +01:00
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
2023-11-07 23:06:43 +01:00
|
|
|
, maven
|
2024-03-18 02:41:10 +01:00
|
|
|
, jdk17
|
2023-11-07 22:15:37 +01:00
|
|
|
, jre
|
2023-11-07 23:06:43 +01:00
|
|
|
, xorg
|
2023-11-09 15:44:34 +01:00
|
|
|
, gitUpdater
|
2023-12-02 23:01:51 +01:00
|
|
|
, libGL
|
2023-11-07 22:15:37 +01:00
|
|
|
}:
|
2018-07-16 04:12:17 +02:00
|
|
|
|
2024-03-18 02:41:10 +01:00
|
|
|
let
|
|
|
|
mavenJdk17 = maven.override {
|
|
|
|
jdk = jdk17;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
mavenJdk17.buildMavenPackage rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "runelite";
|
2024-02-02 16:11:03 +01:00
|
|
|
version = "2.6.13";
|
2018-07-16 04:12:17 +02:00
|
|
|
|
2023-11-07 23:06:43 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "runelite";
|
|
|
|
repo = "launcher";
|
|
|
|
rev = version;
|
2024-02-02 16:11:03 +01:00
|
|
|
hash = "sha256-KE0UMtm1rypyV5FIxxiJeoP/IeSEzpzqfUyQ9UnxA0o=";
|
2018-07-16 04:12:17 +02:00
|
|
|
};
|
2024-01-03 23:04:55 +01:00
|
|
|
mvnHash = "sha256-bsJlsIXIIVzZyVgEF/SN+GgpZt6v0u800arO1c5QYHk=";
|
2021-05-27 02:02:02 +02:00
|
|
|
|
2018-07-16 04:12:17 +02:00
|
|
|
desktop = makeDesktopItem {
|
|
|
|
name = "RuneLite";
|
|
|
|
type = "Application";
|
|
|
|
exec = "runelite";
|
2023-11-07 23:06:43 +01:00
|
|
|
icon = "runelite";
|
2018-07-16 04:12:17 +02:00
|
|
|
comment = "Open source Old School RuneScape client";
|
|
|
|
desktopName = "RuneLite";
|
|
|
|
genericName = "Oldschool Runescape";
|
2022-02-22 15:56:15 +01:00
|
|
|
categories = [ "Game" ];
|
2018-07-16 04:12:17 +02:00
|
|
|
};
|
|
|
|
|
2023-11-07 23:06:43 +01:00
|
|
|
# tests require internet :(
|
|
|
|
mvnParameters = "-Dmaven.test.skip";
|
2023-09-12 00:26:31 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2023-11-07 23:06:43 +01:00
|
|
|
|
2018-07-16 04:12:17 +02:00
|
|
|
installPhase = ''
|
2023-11-07 23:06:43 +01:00
|
|
|
mkdir -p $out/share/icons
|
2023-11-27 21:31:48 +01:00
|
|
|
mkdir -p $out/share/applications
|
2018-07-16 04:12:17 +02:00
|
|
|
|
2023-11-07 23:06:43 +01:00
|
|
|
cp target/RuneLite.jar $out/share
|
|
|
|
cp appimage/runelite.png $out/share/icons
|
2018-07-16 04:12:17 +02:00
|
|
|
|
2023-11-27 21:31:48 +01:00
|
|
|
ln -s ${desktop}/share/applications/RuneLite.desktop $out/share/applications/RuneLite.desktop
|
|
|
|
|
2018-07-16 04:12:17 +02:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/runelite \
|
2023-12-02 23:01:51 +01:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libXxf86vm libGL ]}" \
|
2023-11-07 23:06:43 +01:00
|
|
|
--add-flags "-jar $out/share/RuneLite.jar"
|
2018-07-16 04:12:17 +02:00
|
|
|
'';
|
|
|
|
|
2023-11-09 15:44:34 +01:00
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
|
2023-09-12 00:26:31 +02:00
|
|
|
meta = {
|
2018-07-16 04:12:17 +02:00
|
|
|
description = "Open source Old School RuneScape client";
|
|
|
|
homepage = "https://runelite.net/";
|
2023-09-12 00:26:31 +02:00
|
|
|
sourceProvenance = with lib.sourceTypes; [
|
2022-06-10 22:12:22 +02:00
|
|
|
binaryBytecode
|
|
|
|
binaryNativeCode
|
|
|
|
];
|
2023-09-12 00:26:31 +02:00
|
|
|
license = lib.licenses.bsd2;
|
2023-11-07 23:06:43 +01:00
|
|
|
maintainers = with lib.maintainers; [ kmeakin moody ];
|
2021-05-27 02:02:02 +02:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2023-09-12 00:42:27 +02:00
|
|
|
mainProgram = "runelite";
|
2018-07-16 04:12:17 +02:00
|
|
|
};
|
2023-11-07 23:06:43 +01:00
|
|
|
}
|