diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-02-08 22:15:55 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-02-08 22:15:55 +0100 |
commit | 3c6c1392de4ee4a6c0bb13cb7908f9304d6dd053 (patch) | |
tree | 8eb7abf04eb250e5337c90acb69103adaeeef422 /pkgs/games/humblebundle/hammerwatch.nix | |
parent | 42c3024877bbdd127e7002e35f41cd87aaf792f7 (diff) | |
parent | 5570ec94ffe086f1ff47ad99606d39eb7b815dd1 (diff) |
Merge aszlig/nixgames into vuizvui
This is a subtree merge of the full nixgames repository including history. Right now it isn't linked to vuizvui at all but we're going to do that very soon. The reason why I'm merging both repositories together is that it's easier for me to manage updates and also facilitate contributions by people from the OpenLab. Another reason to merge it is that we can write more generic functions for building both, the games and the rest. Right now the licensing is still the Apache License version 2.0, but we're going to change it to the vuizvui license as well.
Diffstat (limited to 'pkgs/games/humblebundle/hammerwatch.nix')
-rw-r--r-- | pkgs/games/humblebundle/hammerwatch.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/games/humblebundle/hammerwatch.nix b/pkgs/games/humblebundle/hammerwatch.nix new file mode 100644 index 00000000..8cf65211 --- /dev/null +++ b/pkgs/games/humblebundle/hammerwatch.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchHumbleBundle, makeWrapper, unzip, mono, SDL2, mesa, openal +, pulseaudio +}: + +# FIXME: Dosn't support the XDG Base Directory Specification, +# so enforce it using LD_PRELOAD maybe? + +stdenv.mkDerivation rec { + name = "hammerwatch-${version}"; + version = "1.3"; + + src = fetchHumbleBundle { + machineName = "hammerwatch_linux"; + suffix = "zip"; + md5 = "7cd77e4395f394c3062322c96e418732"; + }; + + buildInputs = [ unzip makeWrapper ]; + + installPhase = let + rpath = stdenv.lib.makeLibraryPath [ SDL2 mesa openal pulseaudio ]; + monoNoLLVM = mono.override { withLLVM = false; }; + in '' + mkdir -p "$out/lib" + cp -rt "$out/lib" SDL2-CS.dll SDL2-CS.dll.config \ + TiltedEngine.dll Lidgren.Network.dll FarseerPhysicsOTK.dll \ + ICSharpCode.SharpZipLib.dll SteamworksManaged.dll NVorbis.dll + + libexec="$out/libexec/hammerwatch" + install -vD Hammerwatch.exe "$libexec/hammerwatch.exe" + cp -rt "$libexec" assets.bin editor levels + + makeWrapper "${monoNoLLVM}/bin/mono" "$out/bin/hammerwatch" \ + --add-flags "$libexec/hammerwatch.exe" \ + --set MONO_PATH "$out/lib" \ + --set LD_LIBRARY_PATH "${rpath}" + ''; + + dontStrip = true; +} |