From 7761067283616208fa8f30f7150e328df7a09090 Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Wed, 23 Apr 2025 13:31:19 -0700 Subject: [PATCH] [gaming] Adds warcraft logs app. --- home-manager/features/gaming.nix | 50 ++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/home-manager/features/gaming.nix b/home-manager/features/gaming.nix index 972d331..5f9a61e 100644 --- a/home-manager/features/gaming.nix +++ b/home-manager/features/gaming.nix @@ -1,20 +1,28 @@ { pkgs, local, ... }: -# TODO: This is an attempt to patch the desktop file by actually using the old -# one so I don't have to put in all the options like below. This will generate -# the correct file, however, xdg.dataFile."applications/wowup-cf.desktop" -# doesn't seem to actually overrwite it, even with force = true. -# let -# patched-desktop = -# pkgs.runCommand "patched-wowup-cf-desktop" -# { -# desktop = "${pkgs.wowup-cf}/share/applications/wowup-cf.desktop"; -# } -# '' -# mkdir -p $out -# substitute "$desktop" "$out/wowup-cf.desktop" \ -# --replace-fail 'Exec=wowup-cf' 'Exec=wowup-cf --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu' -# ''; -# in +let + # TODO: This is an attempt to patch the desktop file by actually using the old + # one so I don't have to put in all the options like below. This will generate + # the correct file, however, xdg.dataFile."applications/wowup-cf.desktop" + # doesn't seem to actually overrwite it, even with force = true. + # patched-desktop = + # pkgs.runCommand "patched-wowup-cf-desktop" + # { + # desktop = "${pkgs.wowup-cf}/share/applications/wowup-cf.desktop"; + # } + # '' + # mkdir -p $out + # substitute "$desktop" "$out/wowup-cf.desktop" \ + # --replace-fail 'Exec=wowup-cf' 'Exec=wowup-cf --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu' + # ''; + warcraftLogsUploader = pkgs.fetchurl { + url = "https://github.com/RPGLogs/Uploaders-warcraftlogs/releases/download/v8.16.56/warcraftlogs-v8.16.56.AppImage"; + sha256 = "1aypr3ffy6lq0qj64d48c7n54nfs72404xb2kpxsw5slqh66imw6"; + }; + warcraftLogsIcon = pkgs.fetchurl { + url = "https://assets.rpglogs.com/img/warcraft/favicon.png"; + sha256 = "0hil7rj7a0bmls0h4w3xmfzcp1gm5yfagbziv1967lmy70ri0bc9"; + }; +in { home.packages = with pkgs; [ # Gaming @@ -49,4 +57,14 @@ "Game" ]; }; + + xdg.desktopEntries.warcraftLogs = { + name = "WarcraftLogs"; + exec = "${pkgs.appimage-run}/bin/appimage-run ${warcraftLogsUploader}"; + terminal = false; + type = "Application"; + icon = "${warcraftLogsIcon}"; + comment = "WarcraftLogs uploader"; + categories = [ "Game" ]; + }; }