nix-config/pkgs/hdos/default.nix
Greg Burd f3fd89af54
A fork of Misterio77 and his standard template.
Many thangs to the hard work and generous availability of:
git@github.com:Misterio77/nix-config.git
2023-09-15 10:53:38 -04:00

47 lines
1.5 KiB
Nix

{ lib, stdenv, fetchurl, makeWrapper, openjdk11, makeDesktopItem, copyDesktopItems }:
stdenv.mkDerivation (finalAttrs: {
pname = "hdos";
version = "411";
src = fetchurl {
# TODO find out a stable URL
url = "https://cdn.hdos.dev/launcher/latest/hdos-launcher.jar";
hash = "sha256-00ddeR+ov6Tjrn+pscXoao4C0ek/iP9Hdlgq946pL8A=";
};
dontUnpack = true;
desktop = makeDesktopItem {
name = "HDOS";
type = "Application";
exec = "hdos";
icon = fetchurl {
url = "https://raw.githubusercontent.com/flathub/dev.hdos.HDOS/8e17cbecb06548fde2c023032e89ddf30befeabc/dev.hdos.HDOS.png";
hash = "sha256-pqLNJ0g7GCPotgEPfw2ZZOqapaCRAsJxB09INp6Y6gM=";
};
comment = "HDOS is a client for Old School RuneScape that emulates the era of 2008-2011 RuneScape HD";
desktopName = "HDOS";
genericName = "Oldschool Runescape";
categories = [ "Game" ];
};
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
installPhase = ''
runHook preInstall
makeWrapper ${openjdk11}/bin/java $out/bin/hdos --add-flags "-jar $src"
runHook postInstall
'';
desktopItems = [ finalAttrs.desktop ];
meta = {
description = "High Detail Old School Runescape Client";
homepage = "https://hdos.dev";
changelog = "https://hdos.dev/changelog";
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
license = lib.licenses.unfreeRedistributable;
platforms = openjdk11.meta.platforms;
maintainers = [ lib.maintainers.misterio77 ];
};
})