Hello, I want to package the game PokeWilds into a nix package. The release for this game is a zip file that contains the app image.
I can run the program just fine using appimage-run, but i really wanted to try packaging it.
This is the derivation i came up with:
pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
pname = "PokeWilds";
version = "0.8.10";
src = pkgs.fetchurl {
url = "https://github.com/SheerSt/pokewilds/releases/download/v${version}/pokewilds-linux64.zip";
sha256 = "sha256-5/bMH+4XQC6zkF0EwXLjctS3u73AUAMzcNUAKhracRE=";
};
nativeBuildInputs = [ pkgs.unzip ];
buildInputs = [ pkgs.unzip ];
installPhase = ''
mkdir -p $out/bin
mv * $out/bin/
mkdir -p $out/share/applications
echo "[Desktop Entry]
Version=1.0
Icon=pokemon
Exec=$out/bin/PokeWilds-x64
Terminal=false
Type=Application
Categories=Game;
Name=PokeWilds
Comment=Openworld Pokemon game" > $out/share/application/PokeWilds.desktop
'';
#appimageTools.wrapType2 {
# name = "PokeWilds";
# src = fetchurl {
# url = "https://github.com/SheerSt/pokewilds/releases/download/v${version}/pokewilds-linux64.zip";
# sha256 = "sha256-5/bMH+4XQC6zkF0EwXLjctS3u73AUAMzcNUAKhracRE=";
#};
meta = with pkgs.lib; {
homepage = "https://github.com/SheerSt/pokewilds";
description = "A description of your application";
platforms = platforms.linux;
};
}
In this derivation i unzip the downloaded file, move the contens to the $out folder and create a .desktop file.
How can i proceed from here ?
Thank you for all the help.