-
-
Save aszlig/ec82270b5a708639f28b536e63a82b61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, buildGame, fetchGog, fetchFromGitHub, makeWrapper | |
# Dependencies for HashLink: | |
, cmake, pkgconfig, haxe | |
, SDL2, libGLU, libpng, libjpeg_turbo, libvorbis, mbedtls, openal, libuv | |
}: | |
let | |
hashlink = stdenv.mkDerivation rec { | |
name = "hashlink-${version}"; | |
version = "1.6"; | |
src = fetchFromGitHub { | |
owner = "HaxeFoundation"; | |
repo = "hashlink"; | |
rev = version; | |
sha256 = "1g3mmr2ghc778li15adpxqhyr5khf56pr53vpnfdi2kcbpnmi4g0"; | |
}; | |
cmakeFlags = [ "-DBUILD_TESTING=OFF" ]; | |
nativeBuildInputs = [ cmake pkgconfig ]; | |
buildInputs = [ | |
SDL2 libGLU libpng libjpeg_turbo libvorbis mbedtls openal libuv | |
]; | |
}; | |
in buildGame rec { | |
name = "dead-cells-${version}"; | |
version = "9.2"; | |
src = fetchGog { | |
productId = 1237807960; | |
downloadName = "en3installer0"; | |
sha256 = "1w0fj0nxcqz4wjl3vs6c7mn201ni784i1gdv293abzxjsc92l738"; | |
}; | |
inherit hashlink; | |
nativeBuildInputs = [ makeWrapper ]; | |
buildInputs = [ libuv hashlink ]; | |
installPhase = '' | |
for i in hlboot.dat res.pak; do | |
install -vD -m 0644 "$i" "$out/share/dead-cells/$i" | |
done | |
install -vD uv.hdll "$out/libexec/dead-cells/uv.hdll" | |
makeWrapper "$hashlink/bin/hl" "$out/bin/dead-cells" \ | |
--prefix LD_LIBRARY_PATH : "$out/libexec/dead-cells" \ | |
--add-flags "$out/share/dead-cells/hlboot.dat" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment