From a53d97e6b382269b23f59c6aded2ad6e5843a141 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Fri, 6 Dec 2024 18:27:57 +0100 Subject: [PATCH] pkgs: package ankama-launcher --- pkgs/ankama-launcher.nix | 32 ++++++++++++++++++++++++++++++++ pkgs/default.nix | 1 + 2 files changed, 33 insertions(+) create mode 100644 pkgs/ankama-launcher.nix diff --git a/pkgs/ankama-launcher.nix b/pkgs/ankama-launcher.nix new file mode 100644 index 0000000..d9eb495 --- /dev/null +++ b/pkgs/ankama-launcher.nix @@ -0,0 +1,32 @@ +{ + appimageTools, + fetchurl, + makeDesktopItem, + ... +}: let + version = "1.0.0"; + pname = "ankama-launcher"; + src = fetchurl { + url = "https://launcher.cdn.ankama.com/installers/production/Ankama%20Launcher-Setup-x86_64.AppImage"; + sha256 = "sha256-K/qe/qxMfcGWU5gyEfPdl0ptjTCWaqIXMCy4O8WEKCQ="; + }; + desktopItem = makeDesktopItem { + desktopName = "Ankama Launcher"; + name = pname; + exec = pname; + icon = pname; + }; + + appimageContents = appimageTools.extract { + inherit pname version src; + }; +in + appimageTools.wrapType2 { + inherit pname version src; + + extraInstallCommands = '' + mkdir -p $out/share/applications $out/share/icons/hicolor/256x256/apps + install -Dm644 ${appimageContents}/usr/share/icons/hicolor/256x256/apps/zaap*.png $out/share/icons/hicolor/256x256/apps/${pname}.png + install -Dm644 ${desktopItem}/share/applications/* $out/share/applications + ''; + } diff --git a/pkgs/default.nix b/pkgs/default.nix index d77fc9a..6b3ccdd 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -12,4 +12,5 @@ }) .callPackage ./bolt-launcher.nix {}; + ankama-launcher = pkgs.callPackage ./ankama-launcher.nix {}; }