Skip to content

Instantly share code, notes, and snippets.

@samueldr
Created December 26, 2018 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueldr/5729d282f878508e18c40bfadcf0e9bf to your computer and use it in GitHub Desktop.
Save samueldr/5729d282f878508e18c40bfadcf0e9bf to your computer and use it in GitHub Desktop.
#unzip is needed to extract the archive in unpackphase
{wine, unzip, stdenv, fetchurl, writeShellScriptBin}:
let
name = "demolition-gunner";
exename = "demolition.exe";
in
let
game-data = stdenv.mkDerivation rec {
inherit name;
src = fetchurl {
url = http://ftp.vector.co.jp/43/52/3472/DG_ISAD_v2.zip;
sha256 = "1q2qa1jn89k94ar9ql9biz9401iwgr49sb0lxgr3i926gvvia2z1";
};
buildInputs = [ unzip ];
propagatedBuildInputs = [ wine ];
installPhase = ''
mkdir -p $out/share/${name}
cp -prf . $out/share/${name}
'';
};
in
writeShellScriptBin name ''
#!/bin/sh
set -x
cd "${game-data}/share/${name}"
exec "${wine}/bin/wine" "${exename}" "$@"
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment