nixpkgs-suyu/pkgs/games/runelite/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
1.7 KiB
Nix
Raw Normal View History

2023-11-07 22:15:37 +01:00
{ lib
, fetchFromGitHub
2023-11-07 22:15:37 +01:00
, makeDesktopItem
, makeWrapper
, maven
2024-03-18 02:41:10 +01:00
, jdk17
2023-11-07 22:15:37 +01:00
, jre
, xorg
2023-11-09 15:44:34 +01:00
, gitUpdater
, 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 {
pname = "runelite";
2024-02-02 16:11:03 +01:00
version = "2.6.13";
2018-07-16 04:12:17 +02: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";
icon = "runelite";
2018-07-16 04:12:17 +02:00
comment = "Open source Old School RuneScape client";
desktopName = "RuneLite";
genericName = "Oldschool Runescape";
categories = [ "Game" ];
2018-07-16 04:12:17 +02:00
};
# tests require internet :(
mvnParameters = "-Dmaven.test.skip";
2023-09-12 00:26:31 +02:00
nativeBuildInputs = [ makeWrapper ];
2018-07-16 04:12:17 +02:00
installPhase = ''
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
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 \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libXxf86vm libGL ]}" \
--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; [
binaryBytecode
binaryNativeCode
];
2023-09-12 00:26:31 +02:00
license = lib.licenses.bsd2;
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
};
}