nixpkgs/pkgs/games/runelite/default.nix

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

63 lines
1.7 KiB
Nix
Raw Normal View History

2023-11-07 22:15:37 +01:00
{ lib
, stdenv
, makeDesktopItem
, fetchurl
, makeWrapper
, xorg
, jre
,
}:
2018-07-16 04:12:17 +02:00
2023-09-12 00:26:31 +02:00
stdenv.mkDerivation (finalAttrs: {
pname = "runelite";
2023-11-07 22:15:37 +01:00
version = "2.6.9";
2018-07-16 04:12:17 +02:00
2021-05-27 02:02:02 +02:00
jar = fetchurl {
2023-09-12 00:26:31 +02:00
url = "https://github.com/runelite/launcher/releases/download/${finalAttrs.version}/RuneLite.jar";
2023-11-07 22:15:37 +01:00
hash = "sha256-91iBBviXM3tJN/jRgcOzUuTAr9VrKnW55uYrNW7eB5Q=";
2018-07-16 04:12:17 +02:00
};
icon = fetchurl {
2023-09-12 00:26:31 +02:00
url = "https://github.com/runelite/launcher/raw/${finalAttrs.version}/appimage/runelite.png";
hash = "sha256-gcts59jEuRVOmECrnSk40OYjTyJwSfAEys+Qck+VzBE=";
2021-05-27 02:02:02 +02:00
};
dontUnpack = true;
2018-07-16 04:12:17 +02:00
desktop = makeDesktopItem {
name = "RuneLite";
type = "Application";
exec = "runelite";
2023-09-12 00:26:31 +02:00
icon = finalAttrs.icon;
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
};
2023-09-12 00:26:31 +02:00
nativeBuildInputs = [ makeWrapper ];
2018-07-16 04:12:17 +02:00
installPhase = ''
mkdir -p $out/share/runelite
mkdir -p $out/share/applications
2023-09-12 00:26:31 +02:00
ln -s ${finalAttrs.jar} $out/share/runelite/RuneLite.jar
ln -s ${finalAttrs.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 \
2021-05-27 02:02:02 +02:00
--prefix LD_LIBRARY_PATH : "${xorg.libXxf86vm}/lib" \
--add-flags "-jar $out/share/runelite/RuneLite.jar"
2018-07-16 04:12:17 +02:00
'';
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 ];
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-09-12 00:26:31 +02:00
})