about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/gltron/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/gltron/default.nix')
-rw-r--r--nixpkgs/pkgs/games/gltron/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/gltron/default.nix b/nixpkgs/pkgs/games/gltron/default.nix
new file mode 100644
index 000000000000..bd3ae0b2e123
--- /dev/null
+++ b/nixpkgs/pkgs/games/gltron/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl, SDL, libGLU_combined, zlib, libpng, libvorbis, libmikmod, SDL_sound } :
+
+stdenv.mkDerivation rec {
+  name = "gltron-0.70";
+  src = fetchurl {
+    url = "mirror://sourceforge/gltron/${name}-source.tar.gz";
+    sha256 = "e0c8ebb41a18a1f8d7302a9c2cb466f5b1dd63e9a9966c769075e6b6bdad8bb0";
+  };
+
+  patches = [ ./gentoo-prototypes.patch ];
+
+  postPatch = ''
+     # Fix https://sourceforge.net/p/gltron/bugs/15
+     sed -i /__USE_MISC/d lua/src/lib/liolib.c
+  '';
+
+  # The build fails, unless we disable the default -Wall -Werror
+  configureFlags = [ "--disable-warn" ];
+
+  buildInputs = [ SDL libGLU_combined zlib libpng libvorbis libmikmod SDL_sound ];
+
+  meta = {
+    homepage = http://www.gltron.org/;
+    description = "Game based on the movie Tron";
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}