Files
nixpkgs/pkgs/by-name/hd/hdos/package.nix
Peder Bergebakken Sundt 5aba99242e treewide: fix typos in comments
Made with

```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
    typos --no-check-filenames --write-changes "$1"
    git diff --exit-code "$1" && exit
    #( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
    count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
    count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
    [[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```

and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`

I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
2025-02-24 10:44:41 +01:00

65 lines
1.7 KiB
Nix

{
lib,
stdenvNoCC,
fetchurl,
makeWrapper,
# TODO: for jre 17+, we'll need a workaround:
# https://gitlab.com/hdos/issues/-/issues/2004
openjdk11,
makeDesktopItem,
copyDesktopItems,
libGL,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "hdos";
version = "8";
src = fetchurl {
url = "https://cdn.hdos.dev/launcher/v${finalAttrs.version}/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 ${lib.getExe openjdk11} $out/bin/hdos \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
--add-flags "-jar $src"
runHook postInstall
'';
desktopItems = [ finalAttrs.desktop ];
passthru.updateScript = ./update.sh;
meta = {
description = "High Detail Old School Runescape Client";
homepage = "https://hdos.dev";
changelog = "https://hdos.dev/changelog";
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
license = lib.licenses.unfree;
platforms = openjdk11.meta.platforms;
maintainers = [ lib.maintainers.misterio77 ];
};
})