diff options
author | Austin Seipp <aseipp@pobox.com> | 2014-06-28 20:35:35 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2014-06-28 20:35:35 -0500 |
commit | b71d425f789126bbf4d3f20dfd94c699bf966850 (patch) | |
tree | a060c4ca27f6587e3b98a9c20c561906273a5da4 /pkgs/games | |
parent | 18617d66cc832143eada4d994c29638e1b6f3df1 (diff) | |
parent | fdd649780db258171faaad570943fd4b66355d1c (diff) |
Merge pull request #3109 from nslqqq/master
OpenSpades: Initial 0.0.12
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/openspades/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix new file mode 100644 index 000000000000..7f11fc829032 --- /dev/null +++ b/pkgs/games/openspades/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, cmake, curl, glew, makeWrapper, mesa, SDL2, + SDL2_image, unzip, wget, zlib, withOpenal ? true, openal ? null }: + +assert withOpenal -> openal != null; + +stdenv.mkDerivation rec { + name = "openspades-${version}"; + version = "0.0.12"; + + src = fetchurl { + url = "https://github.com/yvt/openspades/archive/v${version}.tar.gz"; + sha256 = "1aa848cck8qrp67ha9vrkzm3k24r2aiv1v4dxla6pi22rw98yxzm"; + }; + + nativeBuildInputs = + with stdenv.lib; + [ cmake curl glew makeWrapper mesa SDL2 SDL2_image unzip wget zlib ] + ++ optional withOpenal openal; + + cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DOPENSPADES_INSTALL_BINARY=bin" ]; + + # OpenAL is loaded dynamicly + postInstall = + if withOpenal then '' + wrapProgram "$out/bin/openspades" \ + --prefix LD_LIBRARY_PATH : "${openal}/lib" + '' + else null; + + meta = with stdenv.lib; { + description = "OpenSpades is a compatible client of Ace of Spades 0.75"; + homepage = "https://github.com/yvt/openspades/"; + license = licenses.gpl3; + platforms = platforms.linux; + }; +} |