nix-config/pkgs/awakened-poe-trade.nix

38 lines
1.2 KiB
Nix
Raw Normal View History

2024-07-26 22:12:48 +02:00
{ pkgs, fetchurl }:
let
2024-01-29 23:01:57 +01:00
name = "awakened-poe-trade";
version = "3.22.10003";
description = "Path of Exile trading app for price checking";
desktopEntry = pkgs.writeText "awakened-poe.desktop" ''
[Desktop Entry]
Type=Application
Version=${version}
Name=Awakened PoE Trade
GenericName=${description}
Icon=/share/applications/awakened-poe-trade.png
Exec=${name}
Terminal=false
Categories=Game
'';
file = "Awakened-PoE-Trade-${version}.AppImage";
icon = pkgs.fetchurl {
url = "https://web.poecdn.com/image/Art/2DItems/Currency/TransferOrb.png";
2024-07-31 14:58:57 +02:00
sha256 = "sha256-llr7i9D8zaEN+P8894MQvnUwQrysxhOLcLH73FPLHtY=";
2024-01-29 23:01:57 +01:00
};
in
2024-07-26 22:12:48 +02:00
pkgs.appimageTools.wrapType2 {
name = "awakened-poe-trade";
src = fetchurl {
url = "https://github.com/SnosMe/awakened-poe-trade/releases/download/v${version}/${file}";
hash = "sha256-b+cDOmU0s0MqP5ZgCacmAon8UqDejG4HcOqi+Uf2dEM=";
};
2024-01-29 23:01:57 +01:00
2024-07-26 22:12:48 +02:00
extraInstallCommands = ''
mkdir -p $out/share/applications
cp ${icon} $out/share/applications/awakened-poe-trade.png
cp ${desktopEntry} $out/share/applications/${name}.desktop
substituteInPlace $out/share/applications/awakened-poe-trade.desktop --replace /share/ $out/share/
'';
}