nixpkgs/pkgs/games/runelite/default.nix

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

71 lines
1.7 KiB
Nix
Raw Normal View History

2023-11-07 21:15:37 +00:00
{ lib
, fetchFromGitHub
2023-11-07 21:15:37 +00:00
, makeDesktopItem
, makeWrapper
, maven
2024-03-18 01:41:10 +00:00
, jdk17
2023-11-07 21:15:37 +00:00
, jre
, xorg
2023-11-09 14:44:34 +00:00
, gitUpdater
, libGL
2023-11-07 21:15:37 +00:00
}:
2018-07-16 02:12:17 +00:00
2024-07-15 13:12:51 +00:00
maven.buildMavenPackage rec {
pname = "runelite";
2024-08-24 11:42:01 +00:00
version = "2.7.2";
2018-07-16 02:12:17 +00:00
src = fetchFromGitHub {
owner = "runelite";
repo = "launcher";
rev = version;
2024-08-24 11:42:01 +00:00
hash = "sha256-ckeZ/7rACyZ5j+zzC5hv1NaXTi9q/KvOzMPTDd1crHQ=";
2018-07-16 02:12:17 +00:00
};
2024-07-15 13:12:51 +00:00
mvnJdk = jdk17;
2024-07-03 23:16:55 +00:00
mvnHash = "sha256-FpfHtGIfo84z6v9/nzc47+JeIM43MR9mWhVOPSi0xhM=";
2021-05-27 00:02:02 +00:00
2018-07-16 02:12:17 +00:00
desktop = makeDesktopItem {
name = "RuneLite";
type = "Application";
exec = "runelite";
icon = "runelite";
2018-07-16 02:12:17 +00:00
comment = "Open source Old School RuneScape client";
desktopName = "RuneLite";
genericName = "Oldschool Runescape";
categories = [ "Game" ];
2018-07-16 02:12:17 +00:00
};
# tests require internet :(
mvnParameters = "-Dmaven.test.skip";
2023-09-11 22:26:31 +00:00
nativeBuildInputs = [ makeWrapper ];
2018-07-16 02:12:17 +00:00
installPhase = ''
mkdir -p $out/share/icons
2023-11-27 20:31:48 +00:00
mkdir -p $out/share/applications
2018-07-16 02:12:17 +00:00
cp target/RuneLite.jar $out/share
cp appimage/runelite.png $out/share/icons
2018-07-16 02:12:17 +00:00
2023-11-27 20:31:48 +00:00
ln -s ${desktop}/share/applications/RuneLite.desktop $out/share/applications/RuneLite.desktop
2018-07-16 02:12:17 +00: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 02:12:17 +00:00
'';
2023-11-09 14:44:34 +00:00
passthru.updateScript = gitUpdater { };
2023-09-11 22:26:31 +00:00
meta = {
2018-07-16 02:12:17 +00:00
description = "Open source Old School RuneScape client";
homepage = "https://runelite.net/";
2023-09-11 22:26:31 +00:00
sourceProvenance = with lib.sourceTypes; [
binaryBytecode
binaryNativeCode
];
2023-09-11 22:26:31 +00:00
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ kmeakin moody ];
2021-05-27 00:02:02 +00:00
platforms = [ "x86_64-linux" ];
2023-09-11 22:42:27 +00:00
mainProgram = "runelite";
2018-07-16 02:12:17 +00:00
};
}