68 lines
1.6 KiB
Nix
68 lines
1.6 KiB
Nix
{ lib
|
|
, fetchFromDrive
|
|
, fetchurl
|
|
, mkWindowsApp
|
|
, wine
|
|
, unzip
|
|
, makeDesktopItem
|
|
, makeDesktopIcon
|
|
, copyDesktopItems
|
|
, copyDesktopIcons
|
|
}:
|
|
let uid = "pkmn-project-untamed";
|
|
in mkWindowsApp rec {
|
|
pname = "Pokemon Project Untamed";
|
|
version = "0.1.3";
|
|
meta.homepage = "https://www.reliccastle.com/threads/6122/";
|
|
meta.description = "Welcome to the Mazah region as envisioned by Subjectively, tackling modernism versus tradition.";
|
|
|
|
dontUnpack = true;
|
|
src = fetchFromDrive rec {
|
|
name = "project-untamed-v${version}.zip";
|
|
url = "1chaQzuVLjGEscqLmHJeMJ5J3eNTbTGwj";
|
|
hash = "sha256-h4AsKFUOMI/gQSppyoTKreZHvSJJrxzdicJ3w8wXmzo=";
|
|
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/"
|
|
'';
|
|
|
|
fileMap."$HOME/.local/share/${uid}/AppData/project-untamed"
|
|
= "drive_c/users/$USER/AppData/Roaming/project-untamed";
|
|
|
|
winAppRun = ''
|
|
$WINE start /unix "$WINEPREFIX"/drive_c/project-untamed/Game.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/minimelos-hive/images/2/2b/Projectuntamedlogotransparent.png";
|
|
hash = "sha256-w2T8huYvExQ/Xviwbl8n3xygjQ555NdO48K2kjYxP0o=";
|
|
};
|
|
};
|
|
|
|
}
|