summary refs log tree commit diff
path: root/pkgs/games/openlierox
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2013-04-06 12:09:07 +0200
committerLluís Batlle i Rossell <viric@viric.name>2013-04-06 12:09:18 +0200
commit78827836cc499016a0dbf165687dd029a81212b0 (patch)
tree11e270f6482ec0a8249c951824757f5db35a3ceb /pkgs/games/openlierox
parentfd184188416a5991fd33554a69921ba98db1d0a2 (diff)
downloadnixpkgs-78827836cc499016a0dbf165687dd029a81212b0.tar
nixpkgs-78827836cc499016a0dbf165687dd029a81212b0.tar.gz
nixpkgs-78827836cc499016a0dbf165687dd029a81212b0.tar.bz2
nixpkgs-78827836cc499016a0dbf165687dd029a81212b0.tar.lz
nixpkgs-78827836cc499016a0dbf165687dd029a81212b0.tar.xz
nixpkgs-78827836cc499016a0dbf165687dd029a81212b0.tar.zst
nixpkgs-78827836cc499016a0dbf165687dd029a81212b0.zip
openlierox: fixing and updating.
Diffstat (limited to 'pkgs/games/openlierox')
-rw-r--r--pkgs/games/openlierox/default.nix81
1 files changed, 32 insertions, 49 deletions
diff --git a/pkgs/games/openlierox/default.nix b/pkgs/games/openlierox/default.nix
index 751941bdfc1..0c7e46ae074 100644
--- a/pkgs/games/openlierox/default.nix
+++ b/pkgs/games/openlierox/default.nix
@@ -1,56 +1,39 @@
-a :  
-let 
-  fetchurl = a.fetchurl;
-
-  version = a.lib.attrByPath ["version"] "0.57beta8" a; 
-  buildInputs = with a; [
-    libX11 xproto gd SDL SDL_image SDL_mixer zlib libxml2
-    pkgconfig
-  ];
-
-in
-rec {
+{ stdenv, fetchurl, libX11, xproto, gd, SDL, SDL_image, SDL_mixer, zlib
+, libxml2, pkgconfig, curl, cmake, libzip }:
+
+stdenv.mkDerivation {
+  name = "openlierox-0.58rc3";
+
   src = fetchurl {
-    url = "http://downloads.sourceforge.net/project/openlierox/openlierox/OpenLieroX%200.57%20Beta8/OpenLieroX_0.57_beta8.src.tar.bz2";
-    sha256 = "1a3p03bi5v2mca7323mrckab9wsj83fjfcr6akrh9a6nlljcdn8d";
+    url = "mirror://sourceforge/openlierox/OpenLieroX_0.58_rc3.src.tar.bz2";
+    sha256 = "1k35xppfqi3qfysv81xq3hj4qdy9j2ciinbkfdcmwclcsf3nh94z";
   };
 
-  inherit buildInputs;
-  configureFlags = [];
-
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doInstall"];
-
-  setParams = a.noDepEntry (''
-    export SYSTEM_DATA_DIR="$out/share"
-    export BIN_DIR="$out/bin"
-    export DOC_DIR="$out/share/doc"
-    export PIXMAP_DIR="$out/share/pixmap"
-
-    export HAWKNL_BUILTIN=1
-    export LIBZIP_BUILTIN=1
-    export X11=1
-    export DEBUG=1
-  '');
-  
-  doBuild=a.fullDepEntry (''
-    sed -re 's/ -1/ 255 /g' -i *.sh
-
-    source functions.sh
-    export INCLUDE_PATH=$(echo $NIX_CFLAGS_COMPILE | grep_param -I)
-    
-    bash compile.sh
-  '') ["doUnpack" "addInputs" "setParams"];
-
-  doInstall = a.fullDepEntry (''
-    mkdir -p $BIN_DIR $SYSTEM_DATA_DIR $DOC_DIR $PIXMAP_DIR
-    bash install.sh
-  '') ["doBuild" "addInputs" "setParams" "defEnsureDir"];
-      
-  name = "openlierox-" + version;
+  NIX_CFLAGS_COMPILE = "-I${libxml2}/include/libxml2";
+
+  # The breakpad fails to build on x86_64, and it's only to report bugs upstream
+  cmakeFlags = [ "-DBREAKPAD=0" ];
+
+  preConfigure = ''
+    cmakeFlags="$cmakeFlags -DSYSTEM_DATA_DIR=$out/share"
+  '';
+
+  patchPhase = ''
+    sed -i s,curl/types.h,curl/curl.h, include/HTTP.h src/common/HTTP.cpp
+  '';
+
+  installPhase = ''
+    ensureDir $out/bin $out/share/OpenLieroX
+    cp bin/* $out/bin
+    cp -R ../share/gamedir/* $out/share/OpenLieroX
+  '';
+
+  buildInputs = [ libX11 xproto gd SDL SDL_image SDL_mixer zlib libxml2
+    pkgconfig curl cmake libzip ];
+
   meta = {
+    homepage = http://openlierox.net;
     description = "Real-time game with Worms-like shooting";
-    maintainers = [
-    ];
+    license = "LGPLv2+";
   };
 }