mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
71 lines
1.7 KiB
Nix
71 lines
1.7 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, makeDesktopItem
|
|
, makeWrapper
|
|
, maven
|
|
, jdk17
|
|
, jre
|
|
, xorg
|
|
, gitUpdater
|
|
, libGL
|
|
}:
|
|
|
|
maven.buildMavenPackage rec {
|
|
pname = "runelite";
|
|
version = "2.7.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "runelite";
|
|
repo = "launcher";
|
|
rev = version;
|
|
hash = "sha256-ckeZ/7rACyZ5j+zzC5hv1NaXTi9q/KvOzMPTDd1crHQ=";
|
|
};
|
|
|
|
mvnJdk = jdk17;
|
|
mvnHash = "sha256-FpfHtGIfo84z6v9/nzc47+JeIM43MR9mWhVOPSi0xhM=";
|
|
|
|
desktop = makeDesktopItem {
|
|
name = "RuneLite";
|
|
type = "Application";
|
|
exec = "runelite";
|
|
icon = "runelite";
|
|
comment = "Open source Old School RuneScape client";
|
|
desktopName = "RuneLite";
|
|
genericName = "Oldschool Runescape";
|
|
categories = [ "Game" ];
|
|
};
|
|
|
|
# tests require internet :(
|
|
mvnParameters = "-Dmaven.test.skip";
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share/icons
|
|
mkdir -p $out/share/applications
|
|
|
|
cp target/RuneLite.jar $out/share
|
|
cp appimage/runelite.png $out/share/icons
|
|
|
|
ln -s ${desktop}/share/applications/RuneLite.desktop $out/share/applications/RuneLite.desktop
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/runelite \
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libXxf86vm libGL ]}" \
|
|
--add-flags "-jar $out/share/RuneLite.jar"
|
|
'';
|
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
meta = {
|
|
description = "Open source Old School RuneScape client";
|
|
homepage = "https://runelite.net/";
|
|
sourceProvenance = with lib.sourceTypes; [
|
|
binaryBytecode
|
|
binaryNativeCode
|
|
];
|
|
license = lib.licenses.bsd2;
|
|
maintainers = with lib.maintainers; [ kmeakin moody ];
|
|
platforms = [ "x86_64-linux" ];
|
|
mainProgram = "runelite";
|
|
};
|
|
}
|