diff --git a/nixos/shared/packages/default.nix b/nixos/shared/packages/default.nix index e6ee20c..83fb9ad 100644 --- a/nixos/shared/packages/default.nix +++ b/nixos/shared/packages/default.nix @@ -47,6 +47,7 @@ knot-dns libressl nettools + starship # System libraries ]) diff --git a/pkgs/hytale/default.nix b/pkgs/hytale/default.nix new file mode 100644 index 0000000..2c549e2 --- /dev/null +++ b/pkgs/hytale/default.nix @@ -0,0 +1,70 @@ +{ + lib, + stdenv, + fetchzip, + autoPatchelfHook, + makeWrapper, + gtk3, + nss, + libsecret, + libsoup_3, + gdk-pixbuf, + glib, + webkitgtk_4_1, + xdg-utils, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "hytale-launcher-bin"; + version = "2026.01.11.b022ef5"; + + src = fetchzip { + url = "https://launcher.hytale.com/builds/release/linux/amd64/hytale-launcher-2026.01.11-b022ef5.zip"; + hash = "sha256-bJQwGSj7B1szXv1e7RN2VQdriSbGe+En1EQONIeLQ84="; + stripRoot = false; + }; + + nativeBuildInputs = [ + autoPatchelfHook + makeWrapper + ]; + + buildInputs = [ + gtk3 + nss + libsecret + libsoup_3 + gdk-pixbuf + glib + webkitgtk_4_1 + ]; + + dontStrip = true; + + installPhase = '' + runHook preInstall + mkdir -p "$out/lib/${finalAttrs.pname}" "$out/bin" "$out/share/applications" + install -Dm755 "hytale-launcher" "$out/lib/${finalAttrs.pname}/hytale-launcher" + makeWrapper "$out/lib/${finalAttrs.pname}/hytale-launcher" "$out/bin/hytale-launcher" \ + --prefix PATH : "${lib.makeBinPath [xdg-utils]}" \ + --set __NV_DISABLE_EXPLICIT_SYNC 1 \ + --set WEBKIT_DISABLE_DMABUF_RENDERER 1 \ + --set DESKTOP_STARTUP_ID com.hypixel.HytaleLauncher + cat > "$out/share/applications/com.hypixel.HytaleLauncher.desktop" <<'desktop' + [Desktop Entry] + Type=Application + Name=Hytale Launcher + Exec=hytale-launcher + Terminal=false + Categories=Game; + desktop + runHook postInstall + ''; + + meta = { + description = "Hytale Launcher (Native Linux)"; + homepage = "https://hytale.com"; + platforms = ["x86_64-linux"]; + license = lib.licenses.unfreeRedistributable; + mainProgram = "hytale-launcher"; + }; +})