nixpkgs/pkgs/games/pokerth/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
2.1 KiB
Nix
Raw Normal View History

{ lib, mkDerivation, fetchFromGitHub, fetchpatch, qmake, qtbase
2018-10-19 19:00:33 +02:00
, SDL, SDL_mixer, boost, curl, gsasl, libgcrypt, libircclient, protobuf, sqlite
2020-04-14 09:59:55 +02:00
, wrapQtAppsHook
2018-10-19 19:00:33 +02:00
, tinyxml2, target ? "client" }:
2016-08-01 12:57:45 +02:00
2020-04-07 16:48:32 +02:00
mkDerivation rec {
2021-06-22 23:44:58 +02:00
pname = "pokerth-${target}";
2018-10-19 19:00:33 +02:00
version = "1.1.2";
2016-08-01 12:57:45 +02:00
2018-10-19 19:00:33 +02:00
src = fetchFromGitHub {
owner = "pokerth";
repo = "pokerth";
rev = "v${version}";
hash = "sha256-j4E3VMpaPqX7+hE3wYRZZUeRD//F+K2Gp8oPmJqX5FQ=";
2018-10-19 19:00:33 +02:00
};
2016-08-01 12:57:45 +02:00
2018-10-19 19:00:33 +02:00
patches = [
(fetchpatch {
name = "pokerth-1.1.2.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/pokerth-1.1.2.patch?h=pokerth&id=7734029cf9c6ef58f42ed873e1b9c3c19eb1df3b";
hash = "sha256-we2UOCFF5J/Wlji/rJeCHDu/dNsUU+R+bTw83AmvDxs=";
})
(fetchpatch {
name = "pokerth-1.1.2.patch.2019";
url = "https://aur.archlinux.org/cgit/aur.git/plain/pokerth-1.1.2.patch.2019?h=pokerth&id=7734029cf9c6ef58f42ed873e1b9c3c19eb1df3b";
hash = "sha256-m6uFPmPC3T9kV7EI1p33vQSi0d/w+YCH0dKjviAphMY=";
})
(fetchpatch {
name = "pokerth-1.1.2.patch.2020";
url = "https://aur.archlinux.org/cgit/aur.git/plain/pokerth-1.1.2.patch.2020?h=pokerth&id=7734029cf9c6ef58f42ed873e1b9c3c19eb1df3b";
hash = "sha256-I2qrgLGSMvFDHyUZFWGPGnuecZ914NBf2uGK02X/wOg=";
})
2018-10-19 19:00:33 +02:00
];
2016-08-27 23:04:09 +02:00
2016-08-01 12:57:45 +02:00
postPatch = ''
2018-10-19 19:00:33 +02:00
for f in *.pro; do
2016-08-01 12:57:45 +02:00
substituteInPlace $f \
2018-10-19 19:00:33 +02:00
--replace '$$'{PREFIX}/include/libircclient ${libircclient.dev}/include/libircclient \
2018-09-19 08:32:25 +02:00
--replace 'LIB_DIRS =' 'LIB_DIRS = ${boost.out}/lib' \
2018-10-19 19:00:33 +02:00
--replace /opt/gsasl ${gsasl}
2016-08-01 12:57:45 +02:00
done
'';
2020-04-14 09:59:55 +02:00
nativeBuildInputs = [ qmake wrapQtAppsHook ];
2016-08-27 23:04:09 +02:00
2018-10-19 19:00:33 +02:00
buildInputs = [
SDL
SDL_mixer
boost
curl
gsasl
libgcrypt
libircclient
protobuf
qtbase
sqlite
tinyxml2
];
qmakeFlags = [
"CONFIG+=${target}"
"pokerth.pro"
];
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL";
2018-10-19 19:00:33 +02:00
2021-01-15 05:31:39 +01:00
meta = with lib; {
homepage = "https://www.pokerth.net";
2018-10-19 19:00:33 +02:00
description = "Poker game ${target}";
license = licenses.gpl3;
2021-12-31 19:48:55 +01:00
maintainers = with maintainers; [ obadz yana ];
2018-10-19 19:00:33 +02:00
platforms = platforms.all;
2016-08-01 12:57:45 +02:00
};
}