1{ lib, stdenv, fetchurl, libX11, xorgproto, gd, SDL, SDL_image, SDL_mixer, zlib
2, libxml2, pkg-config, curl, cmake, libzip }:
3
4stdenv.mkDerivation rec {
5 pname = "openlierox";
6 version = "0.58rc3";
7
8 src = fetchurl {
9 url = "mirror://sourceforge/openlierox/OpenLieroX_0.58_rc3.src.tar.bz2";
10 sha256 = "1k35xppfqi3qfysv81xq3hj4qdy9j2ciinbkfdcmwclcsf3nh94z";
11 };
12
13 env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -std=c++98 -Wno-error";
14
15 # The breakpad fails to build on x86_64, and it's only to report bugs upstream
16 cmakeFlags = [ "-DBREAKPAD=0" ];
17
18 preConfigure = ''
19 cmakeFlags="$cmakeFlags -DSYSTEM_DATA_DIR=$out/share"
20 '';
21
22 patchPhase = ''
23 sed -i s,curl/types.h,curl/curl.h, include/HTTP.h src/common/HTTP.cpp
24 '';
25
26 installPhase = ''
27 mkdir -p $out/bin $out/share/OpenLieroX
28 cp bin/* $out/bin
29 cp -R ../share/gamedir/* $out/share/OpenLieroX
30 '';
31
32 nativeBuildInputs = [ cmake pkg-config curl ];
33 buildInputs = [ libX11 xorgproto gd SDL SDL_image SDL_mixer zlib libxml2
34 libzip ];
35
36 meta = {
37 homepage = "http://openlierox.net";
38 description = "Real-time game with Worms-like shooting";
39 license = lib.licenses.lgpl2Plus;
40 platforms = lib.platforms.linux;
41 };
42}