diff options
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/freeciv/default.nix | 23 | ||||
-rw-r--r-- | pkgs/games/stuntrally/default.nix | 14 |
2 files changed, 27 insertions, 10 deletions
diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index f5b101b8882..7aaf3238308 100644 --- a/pkgs/games/freeciv/default.nix +++ b/pkgs/games/freeciv/default.nix @@ -1,15 +1,26 @@ -{ stdenv, fetchurl, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype -, pkgconfig, fontconfig, libzip, zip, zlib }: +{ stdenv, fetchurl, zlib, bzip2, pkgconfig +, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype +, gtkClient ? false, gtk +, server ? true, readline }: +let + inherit (stdenv.lib) optional optionals; + client = sdlClient || gtkClient; +in stdenv.mkDerivation rec { - name = "freeciv-2.2.7"; + name = "freeciv-2.3.1"; src = fetchurl { - url = "mirror://sf/freeciv/${name}.tar.bz2"; - sha256 = "993dd1685dad8012225fdf434673515a194fa072b3d5bfb04952a98fb862d319"; + url = "mirror://sourceforge/freeciv/${name}.tar.bz2"; + sha256 = "1n3ak0y9hj9kha0r3cdbi8zb47vrgal1jsbblamqgwwwgzy8cri3"; }; - buildInputs = [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype pkgconfig fontconfig libzip zip zlib] ; + buildNativeInputs = [ pkgconfig ]; + + buildInputs = [ zlib bzip2 ] + ++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype ] + ++ optional gtkClient gtk + ++ optional server readline; meta = with stdenv.lib; { description = "multiplayer (or single player), turn-based strategy game."; diff --git a/pkgs/games/stuntrally/default.nix b/pkgs/games/stuntrally/default.nix index 14db3dd52b8..69609b1bbfb 100644 --- a/pkgs/games/stuntrally/default.nix +++ b/pkgs/games/stuntrally/default.nix @@ -1,6 +1,5 @@ -{ fetchurl, stdenv, cmake, boost, ogre, myguiSvn, ois, SDL, libvorbis, pkgconfig }: - -throw "Stunt Rally needs ogre with cg support at runtime - we have to package nvidia cg" +{ fetchurl, stdenv, cmake, boost, ogre, myguiSvn, ois, SDL, libvorbis, pkgconfig +, makeWrapper }: stdenv.mkDerivation rec { name = "stunt-rally-1.4"; @@ -10,7 +9,14 @@ stdenv.mkDerivation rec { sha256 = "1am5af4l1qliyrq1183sqvwzqwcjx0v6gkzsxhfmk6ygp7yhw7kq"; }; - buildInputs = [ cmake boost ogre myguiSvn ois SDL libvorbis pkgconfig ]; + buildInputs = [ cmake boost ogre myguiSvn ois SDL libvorbis pkgconfig makeWrapper ]; + + # I think they suppose cmake should give them OGRE_PLUGIN_DIR defined, but + # the cmake code I saw is not ready for that. Therefore, we use the env var. + postInstall = '' + wrapProgram $out/bin/stuntrally --set OGRE_PLUGIN_DIR ${ogre}/lib/OGRE + wrapProgram $out/bin/sr-editor --set OGRE_PLUGIN_DIR ${ogre}/lib/OGRE + ''; enableParallelBuilding = true; |