Skip to content

Instantly share code, notes, and snippets.

@Zhaith-Izaliel
Created July 27, 2021 15:13
Show Gist options
  • Save Zhaith-Izaliel/fca4074517059ed11f0a1157ddc07702 to your computer and use it in GitHub Desktop.
Save Zhaith-Izaliel/fca4074517059ed11f0a1157ddc07702 to your computer and use it in GitHub Desktop.
NixOS ankama-launcher package
with import <nixpkgs>{};
let
name = "ankama-launcher";
src = fetchurl {
url = "https://download.ankama.com/launcher/full/linux/x64";
sha256 = ""; # Change for the sha256 you get after running nix-prefetch-url https://download.ankama.com/launcher/full/linux/x64
name = "ankama-launcher.AppImage";
};
appimageContents = appimageTools.extractType2 { inherit name src; };
in
appimageTools.wrapType2 {
inherit name src;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/zaap.desktop $out/share/applications/ankama-launcher.desktop
sed -i 's/.*Exec.*/Exec=ankama-launcher/' $out/share/applications/ankama-launcher.desktop
install -m 444 -D ${appimageContents}/zaap.png $out/share/icons/hicolor/256x256/apps/zaap.png
'';
}
@Leznom-zz
Copy link

I really enjoyed your contribution. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment