pkgs: package ankama-launcher

This commit is contained in:
Anthony Rodriguez 2024-12-06 18:27:57 +01:00
parent 4f6df51bf9
commit a53d97e6b3
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
2 changed files with 33 additions and 0 deletions

32
pkgs/ankama-launcher.nix Normal file
View file

@ -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
'';
}

View file

@ -12,4 +12,5 @@
})
.callPackage
./bolt-launcher.nix {};
ankama-launcher = pkgs.callPackage ./ankama-launcher.nix {};
}