diff --git a/pkgs/development/libraries/smpeg/default.nix b/pkgs/development/libraries/smpeg/default.nix new file mode 100644 index 000000000000..3e7baf77df8e --- /dev/null +++ b/pkgs/development/libraries/smpeg/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchsvn, SDL, autoconf, automake, libtool, gtk, m4, pkgconfig, mesa }: + +stdenv.mkDerivation rec { + name = "smpeg-svn-${version}"; + version = "390"; + + src = fetchsvn { + url = svn://svn.icculus.org/smpeg/trunk; + rev = version; + sha256 = "0ynwn7ih5l2b1kpzpibns9bb9wzfjak7mgrb1ji0dkn2q5pv6lr0"; + }; + + buildInputs = [ SDL autoconf automake libtool gtk m4 pkgconfig mesa ]; + + preConfigure = '' + touch NEWS AUTHORS ChangeLog + autoreconf -fvi -I acinclude + ''; + + postInstall = '' + sed -i -e 's,"SDL.h",,' \ + -e 's,"SDL_mutex.h",,' \ + -e 's,"SDL_audio.h",,' \ + -e 's,"SDL_thread.h",,' \ + -e 's,"SDL_types.h",,' \ + $out/include/smpeg/*.h + ''; + + meta = { + homepage = http://icculus.org/smpeg/; + description = "MPEG decoding library"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/games/btanks/default.nix b/pkgs/games/btanks/default.nix index 7172d4c81478..085c7c4082cb 100644 --- a/pkgs/games/btanks/default.nix +++ b/pkgs/games/btanks/default.nix @@ -1,6 +1,4 @@ -{stdenv, fetchurl, scons, pkgconfig, SDL, mesa, zlib }: - -throw "Still does not build. It needs smpeg" +{stdenv, fetchurl, scons, pkgconfig, SDL, mesa, zlib, smpeg, SDL_image, libvorbis, lua5, zip }: stdenv.mkDerivation rec { name = "battle-tanks-0.9.8083"; @@ -10,12 +8,15 @@ stdenv.mkDerivation rec { sha256 = "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz"; }; - /* It still does not build */ - buildInputs = [ scons pkgconfig SDL mesa zlib ]; + buildInputs = [ scons pkgconfig SDL mesa zlib smpeg SDL_image libvorbis lua5 + zip ]; + + buildPhase = '' + scons prefix=$out + ''; installPhase = '' - scons PREFIX=$out - scons PREFIX=$out install + scons install ''; meta = { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f9b7419f2be1..de855238ed5c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4075,6 +4075,8 @@ let scheme = guile; }; + smpeg = callPackage ../development/libraries/smpeg { }; + snack = callPackage ../development/libraries/snack { # optional };