diff options
author | wyvie <elijahrum@gmail.com> | 2014-12-24 22:20:16 +0300 |
---|---|---|
committer | wyvie <elijahrum@gmail.com> | 2014-12-24 22:43:28 +0300 |
commit | 10e7ad5dbbbac51fea8574fd9698dcb23b0e7537 (patch) | |
tree | 28cc45f4f6afee4b40bca8fb60eee9e66d62bb6d /pkgs/games/openarena | |
parent | 19a979d9a2976f731540533b791baaeda956e4e9 (diff) |
Added openarena 0.8.8
Diffstat (limited to 'pkgs/games/openarena')
-rw-r--r-- | pkgs/games/openarena/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/games/openarena/default.nix b/pkgs/games/openarena/default.nix new file mode 100644 index 0000000000000..7db727a13fd15 --- /dev/null +++ b/pkgs/games/openarena/default.nix @@ -0,0 +1,41 @@ +{ fetchurl, makeWrapper, patchelf, pkgs, stdenv, SDL, libogg, libvorbis }: + +stdenv.mkDerivation rec { + name = "openarena-${version}"; + version = "0.8.8"; + + src = fetchurl { + name = "openarena.zip"; + url = "http://openarena.ws/request.php?4"; + sha256 = "0jmc1cmdz1rcvqc9ilzib1kilpwap6v0d331l6q53wsibdzsz3ss"; + }; + + buildInputs = [ pkgs.unzip patchelf makeWrapper]; + + installPhase = let + gameDir = "$out/openarena-$version"; + interpreter = "${stdenv.glibc}/lib/ld-linux*.so.?"; + in '' + mkdir -pv $out/bin + cd $out + unzip $src + + if [ "${stdenv.system}" == "x86_64-linux" ]; then + patchelf --set-interpreter ${interpreter} ${gameDir}/openarena.x86_64 + makeWrapper "${gameDir}/openarena.x86_64" "$out/bin/openarena" \ + --prefix LD_LIBRARY_PATH : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib" + else + patchelf --set-interpreter ${interpreter} ${gameDir}/openarena.i386 + makeWrapper "${gameDir}/openarena.i386" "$out/bin/openarena" \ + --prefix LD_LIBRARY_PATH : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib" + fi + ''; + + meta = { + description = "Crossplatform openarena client"; + homepage = http://openarena.ws/; + maintainers = [ stdenv.lib.maintainers.wyvie ]; + platforms = stdenv.lib.platforms.linux; + license = stdenv.lib.licenses.gpl2; + }; +} |