@@ -0,0 +1,41 @@
1+{ stdenv, lib, fetchFromGitHub, qmake4Hook, qt4, protobuf, boost155, tinyxml2, libgcrypt, sqlite, gsasl, curl, SDL, SDL_mixer, libircclient }:
2+
3+let boost = boost155;
4+in stdenv.mkDerivation rec {
5+ name = "${pname}-${version}";
6+ pname = "pokerth";
7+ version = "1.1.1";
8+
9+ src = fetchFromGitHub {
10+ owner = pname;
11+ repo = pname;
12+ rev = "7f3c8a860848c16c8c2f78e3929a65a54ef4c04c";
13+ sha256 = "1md3sl7pdpn3n42k75pxqbkkl19cz4699g1vdi04qpp0jxx09a2k";
14+ };
15+
16+ buildInputs = [ qmake4Hook qt4 protobuf boost tinyxml2 libgcrypt sqlite gsasl curl SDL SDL_mixer libircclient ];
17+
18+ outputs = [ "out" "server" ];
19+
20+ qmakeFlags = [ "pokerth.pro" ];
21+
22+ postPatch = ''
23+ for f in connectivity.pro load.pro pokerth_game.pro pokerth_server.pro
24+ do
25+ substituteInPlace $f \
26+ --replace 'LIB_DIRS =' 'LIB_DIRS = ${boost.out}/lib'
27+ done
28+ '';
29+
30+ postInstall = ''
31+ install -D -m755 bin/pokerth_server $server/bin/pokerth_server
32+ '';
33+
34+ meta = with stdenv.lib; {
35+ homepage = http://www.pokerth.net/;
36+ description = "Open Source Poker client and server";
37+ license = licenses.gpl3;
38+ maintainers = with maintainers; [ obadz ];
39+ platforms = platforms.all;
40+ };
41+}