69 lines
1.8 KiB
Nix
69 lines
1.8 KiB
Nix
|
{ lib
|
||
|
, fetchFromMega
|
||
|
, fetchFromMediafire
|
||
|
, fetchurl
|
||
|
, mkWindowsApp
|
||
|
, wine
|
||
|
, unzip
|
||
|
, makeDesktopItem
|
||
|
, makeDesktopIcon
|
||
|
, copyDesktopItems
|
||
|
, copyDesktopIcons
|
||
|
}:
|
||
|
let uid = "pkmn-infinite-fusion";
|
||
|
in mkWindowsApp rec {
|
||
|
pname = "Pokemon Infinite Fusion";
|
||
|
version = "5.2.1";
|
||
|
meta.homepage = "https://www.pokecommunity.com/showthread.php?t=347883";
|
||
|
meta.description = "This game re-introduces the DNA Splicers from Black and White 2... Except this time, you can use it on EVERY Pokémon!";
|
||
|
|
||
|
dontUnpack = true;
|
||
|
src = fetchFromMediafire rec {
|
||
|
name = "infinitefusion_preloaded_${version}_full.zip";
|
||
|
url = "https://www.mediafire.com/file/2eqpi1qq74yl1gb/infinitefusion_preloaded_5.2.1_full.zip/file";
|
||
|
hash = "sha256-JyalBh2ikwAbNm1SUg2oYXnLKbg2jG0ZmBUjoFOhGuk=";
|
||
|
assert_exists = [ name ];
|
||
|
};
|
||
|
|
||
|
inherit wine;
|
||
|
wineArch = "win64";
|
||
|
nativeBuildInputs = [ copyDesktopItems copyDesktopIcons ];
|
||
|
|
||
|
installPhase = ''
|
||
|
runHook preInstall
|
||
|
ln -s $out/bin/.launcher $out/bin/${lib.escapeShellArg pname}
|
||
|
runHook postInstall
|
||
|
'';
|
||
|
|
||
|
winAppInstall = ''
|
||
|
${unzip}/bin/unzip ${src} -d "$WINEPREFIX/drive_c/${uid}"
|
||
|
'';
|
||
|
|
||
|
fileMap."$HOME/.local/share/${uid}/AppData/infinitefusion"
|
||
|
= "drive_c/users/$USER/AppData/Roaming/infinitefusion";
|
||
|
|
||
|
winAppRun = ''
|
||
|
$WINE start /unix "$WINEPREFIX"/drive_c/${uid}/"Pokemon Infinite Fusion".exe "$ARGS"
|
||
|
'';
|
||
|
|
||
|
desktopItems = [
|
||
|
(makeDesktopItem {
|
||
|
name = pname;
|
||
|
exec = pname;
|
||
|
icon = uid;
|
||
|
desktopName = pname;
|
||
|
categories = ["Game"];
|
||
|
})
|
||
|
];
|
||
|
|
||
|
desktopIcon = makeDesktopIcon {
|
||
|
name = uid;
|
||
|
icoIndex = 0;
|
||
|
src = fetchurl {
|
||
|
url = "https://static.wikia.nocookie.net/infinitefusion/images/e/e6/Site-logo.png";
|
||
|
hash = "sha256-TupD2OHsJnH/SntZUqvjoBvIZziRN+Wv8S0nMLQ7UQE=";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
}
|