74 lines
2.0 KiB
Nix
74 lines
2.0 KiB
Nix
{ lib
|
|
, fetchFromMega
|
|
, fetchurl
|
|
, mkWindowsApp
|
|
, wine
|
|
, wineArch
|
|
, unrar
|
|
, makeDesktopItem
|
|
, makeDesktopIcon
|
|
, copyDesktopItems
|
|
, copyDesktopIcons
|
|
}:
|
|
let uid = "pkmn-clockwork";
|
|
in mkWindowsApp rec {
|
|
pname = "Pokemon Clockwork";
|
|
version = "1.9.0";
|
|
meta.homepage = "https://pokemonclockwork.wixsite.com/clockworkgame";
|
|
meta.description = "Discover the brand new world of Rosari, filled with adventure and mystery surrounding the Mythical Pokémon Celebi!";
|
|
|
|
# has a launcher, persists downloaded game in .local.
|
|
# the bottle closes once the launcher exits, but the game still runs?
|
|
meta.broken = true;
|
|
|
|
dontUnpack = true;
|
|
src = fetchFromMega rec {
|
|
name = "Setup.msi";
|
|
url = "https://mega.nz/file/pCBWBaxK#5LZjsYXaMu3CQhX9zz0EkSeTqIeqmyVD39ME8TYZj6U";
|
|
hash = "sha256-H0dcGSffxDdscsD0FFQloP2rKFRwMWylKBqPb//9fHM=";
|
|
assert_exists = [ name ];
|
|
};
|
|
|
|
inherit wine wineArch;
|
|
nativeBuildInputs = [ copyDesktopItems copyDesktopIcons ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
ln -s $out/bin/.launcher $out/bin/${lib.escapeShellArg pname}
|
|
runHook postInstall
|
|
'';
|
|
|
|
winAppInstall = ''
|
|
msiexec /i ${src} /quiet /qn
|
|
'';
|
|
|
|
fileMap."$HOME/.local/share/${uid}/user/$USER"
|
|
= "drive_c/users/$USER";
|
|
fileMap."$HOME/.local/share/${uid}/gamedata/Xenoverse Per Aspera Ad Astra"
|
|
= "drive_c/Program Files/XenoTeam/Xenoverse/Xenoverse Per Aspera Ad Astra";
|
|
|
|
winAppRun = ''
|
|
$WINE start /unix "$WINEPREFIX/drive_c/Program Files/XenoTeam/Xenoverse/XenoverseLauncher.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.wixstatic.com/media/e1c82c_1208b7119adb4ed1a26700a0d6a5a984~mv2.png/v1/crop/x_237,y_146,w_1445,h_788/fill/w_1394,h_756,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/TITLE.png";
|
|
hash = "sha256-ZWtb45gRuxG2LJBEb0cJspQgUkqUs+N66aXkGSsl8tc=";
|
|
};
|
|
};
|
|
|
|
}
|