nixpkgs/pkgs/games/runelite/default.nix

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

54 lines
1.6 KiB
Nix
Raw Normal View History

2023-09-11 23:26:31 +01:00
{ lib, stdenv, makeDesktopItem, fetchurl, makeWrapper, xorg, jre, }:
2018-07-16 03:12:17 +01:00
2023-09-11 23:26:31 +01:00
stdenv.mkDerivation (finalAttrs: {
pname = "runelite";
2023-09-11 23:26:31 +01:00
version = "2.6.8";
2018-07-16 03:12:17 +01:00
2021-05-27 01:02:02 +01:00
jar = fetchurl {
2023-09-11 23:26:31 +01:00
url = "https://github.com/runelite/launcher/releases/download/${finalAttrs.version}/RuneLite.jar";
hash = "sha256-reqTRYXmpfxwo5MkxQFdifldFpTY0ascTPXA4mSvluM=";
2018-07-16 03:12:17 +01:00
};
icon = fetchurl {
2023-09-11 23:26:31 +01:00
url = "https://github.com/runelite/launcher/raw/${finalAttrs.version}/appimage/runelite.png";
hash = "sha256-gcts59jEuRVOmECrnSk40OYjTyJwSfAEys+Qck+VzBE=";
2021-05-27 01:02:02 +01:00
};
dontUnpack = true;
2018-07-16 03:12:17 +01:00
desktop = makeDesktopItem {
name = "RuneLite";
type = "Application";
exec = "runelite";
2023-09-11 23:26:31 +01:00
icon = finalAttrs.icon;
2018-07-16 03:12:17 +01:00
comment = "Open source Old School RuneScape client";
desktopName = "RuneLite";
genericName = "Oldschool Runescape";
categories = [ "Game" ];
2018-07-16 03:12:17 +01:00
};
2023-09-11 23:26:31 +01:00
nativeBuildInputs = [ makeWrapper ];
2018-07-16 03:12:17 +01:00
installPhase = ''
mkdir -p $out/share/runelite
mkdir -p $out/share/applications
2023-09-11 23:26:31 +01: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 03:12:17 +01:00
makeWrapper ${jre}/bin/java $out/bin/runelite \
2021-05-27 01:02:02 +01:00
--prefix LD_LIBRARY_PATH : "${xorg.libXxf86vm}/lib" \
--add-flags "-jar $out/share/runelite/RuneLite.jar"
2018-07-16 03:12:17 +01:00
'';
2023-09-11 23:26:31 +01:00
meta = {
2018-07-16 03:12:17 +01:00
description = "Open source Old School RuneScape client";
homepage = "https://runelite.net/";
2023-09-11 23:26:31 +01:00
sourceProvenance = with lib.sourceTypes; [
binaryBytecode
binaryNativeCode
];
2023-09-11 23:26:31 +01:00
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ kmeakin ];
2021-05-27 01:02:02 +01:00
platforms = [ "x86_64-linux" ];
2018-07-16 03:12:17 +01:00
};
2023-09-11 23:26:31 +01:00
})