From 24b76784e1140a3081822d03c22e899fdff6a680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 16 May 2009 23:14:37 +0000 Subject: [PATCH] Adding trackballs svn path=/nixpkgs/trunk/; revision=15625 --- pkgs/games/trackballs/default.nix | 32 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/games/trackballs/default.nix diff --git a/pkgs/games/trackballs/default.nix b/pkgs/games/trackballs/default.nix new file mode 100644 index 000000000000..bdac6cddf2d2 --- /dev/null +++ b/pkgs/games/trackballs/default.nix @@ -0,0 +1,32 @@ +{stdenv, fetchurl, SDL, mesa, SDL_ttf, gettext, zlib, SDL_mixer, SDL_image, guile, + debug ? false } : + +stdenv.mkDerivation rec { + name = "trackballs-1.1.4"; + src = fetchurl { + url = mirror://sourceforge/trackballs/trackballs-1.1.4.tar.gz; + sha256 = "19ilnif59sxa8xmfisk90wngrd11pj8s86ixzypv8krm4znbm7a5"; + }; + + buildInputs = [ zlib mesa SDL SDL_ttf SDL_mixer SDL_image guile gettext ]; + + CFLAGS = if debug then "-g -O0" else null; + CXXFLAGS = CFLAGS; + NIX_STRIP_DEBUG = if debug then "0" else "1"; + dontStrip = if debug then true else false; + postUnpack = if debug then + "ensureDir $out/src; cp -R * $out/src ; cd $out/src" + else null; + + NIX_CFLAGS_COMPILE="-iquote ${SDL}/include/SDL"; + configureFlags = if debug then "--enable-debug" else null; + + patchPhase = '' + sed -i -e 's/images icons music/images music/' share/Makefile.in + ''; + + meta = { + homepage = http://trackballs.sourceforge.net/; + description = "3D Marble Madness clone"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a4ab8442c6c..8501ca4d3bc8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5353,6 +5353,11 @@ let inherit fetchurl stdenv; }; + trackballs = import ../games/trackballs { + inherit stdenv fetchurl SDL mesa SDL_ttf gettext zlib SDL_mixer SDL_image guile; + debug = false; + }; + tunctl = import ../os-specific/linux/tunctl { inherit stdenv fetchurl; };