From 9100e6d42da30fee188a471eface6814bb8e7eb0 Mon Sep 17 00:00:00 2001 From: traxys Date: Mon, 12 Aug 2024 22:11:10 +0200 Subject: [PATCH] gaming: Add weakauras companion --- gaming/hm.nix | 1 + pkgs/default.nix | 1 + pkgs/weakauras-companion.nix | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 pkgs/weakauras-companion.nix diff --git a/gaming/hm.nix b/gaming/hm.nix index 9c12e96..fd8ce87 100644 --- a/gaming/hm.nix +++ b/gaming/hm.nix @@ -13,6 +13,7 @@ warcraftlogs wine-tkg winetricks + weakauras-companion wowup xivlauncher obs-studio diff --git a/pkgs/default.nix b/pkgs/default.nix index 6bc7416..bfa6681 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -27,6 +27,7 @@ mesonlsp = pkgs.callPackage ./mesonlsp { }; push-to-talk = pkgs.callPackage ./push-to-talk.nix { }; pulse8-cec = pkgs.callPackage ./pulse8-cec.nix { }; + weakauras-companion = pkgs.callPackage ./weakauras-companion.nix { }; }; }; } diff --git a/pkgs/weakauras-companion.nix b/pkgs/weakauras-companion.nix new file mode 100644 index 0000000..b1053ce --- /dev/null +++ b/pkgs/weakauras-companion.nix @@ -0,0 +1,33 @@ +{ + appimageTools, + fetchurl, + lib, +}: +appimageTools.wrapType2 rec { + pname = "WeakAuras-Companion"; + version = "5.2.4"; + + src = fetchurl { + url = "https://github.com/WeakAuras/WeakAuras-Companion/releases/download/v${version}/WeakAuras-Companion-${version}.AppImage"; + sha256 = "sha256-r+XwfjrL8QBV+malPj9r4aDVTeNAvsLdBfEIltGmdGU="; + }; + + extraInstallCommands = + let + appimageContents = appimageTools.extractType2 { inherit pname version src; }; + in + '' + install -m 444 -D ${appimageContents}/weakauras-companion.desktop $out/share/applications/weakauras-companion.desktop + substituteInPlace $out/share/applications/weakauras-companion.desktop --replace 'Exec=AppRun' 'Exec=${pname}' + install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/0x0/apps/weakauras-companion.png \ + $out/share/icons/hicolor/512x512/apps/weakauras-companion.png + ''; + + meta = with lib; { + homepage = "https://weakauras.wtf/"; + description = " A cross-platform application built to provide the missing link between Wago.io and World of Warcraft "; + license = licenses.gpl3Plus; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ traxys ]; + }; +}