1 { lib, mkDerivation, fetchFromGitHub, runCommand, fetchpatch, patchutils, qmake, qtbase
2 , SDL, SDL_mixer, boost, curl, gsasl, libgcrypt, libircclient, protobuf, sqlite
4 , tinyxml2, target ? "client" }:
8 url = "https://github.com/pokerth/pokerth/commit/ad8c9cabfb85d8293720d0f14840278d38b5feeb.patch";
9 sha256 = "192x3lqvd1fanasb95shdygn997qfrpk1k62k1f4j3s5chkwvjig";
12 revertPatch = patch: runCommand "revert-${patch.name}" {} ''
13 ${patchutils}/bin/interdiff ${patch} /dev/null > $out
18 pname = "pokerth-${target}";
21 src = fetchFromGitHub {
24 rev = "f5688e01b0efb37035e3b0e3a432200185b9a0c5";
25 sha256 = "0la8d036pbscjnbxf8lkrqjfq8a4ywsfwxil452fhlays6mr19h0";
34 substituteInPlace $f \
35 --replace '$$'{PREFIX}/include/libircclient ${libircclient.dev}/include/libircclient \
36 --replace 'LIB_DIRS =' 'LIB_DIRS = ${boost.out}/lib' \
37 --replace /opt/gsasl ${gsasl}
41 nativeBuildInputs = [ qmake wrapQtAppsHook ];
62 NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL";
65 homepage = "https://www.pokerth.net";
66 description = "Poker game ${target}";
67 license = licenses.gpl3;
68 maintainers = with maintainers; [ obadz yana ];
69 platforms = platforms.all;