1{
2 lib,
3 mkDerivation,
4 appstream,
5 fetchFromGitHub,
6 cmake,
7 gettext,
8 libxslt,
9 librsvg,
10 itstool,
11 qtbase,
12 qtquickcontrols2,
13 qtsvg,
14 qttools,
15 qtwebview,
16 docbook_xsl,
17}:
18
19mkDerivation rec {
20 version = "20.0";
21 pname = "pentobi";
22
23 src = fetchFromGitHub {
24 owner = "enz";
25 repo = "pentobi";
26 rev = "v${version}";
27 sha256 = "sha256-DQM3IJ0pRkX4OsrjZGROg50LfKb621UnpvtqSjxchz8=";
28 };
29
30 nativeBuildInputs = [
31 cmake
32 docbook_xsl
33 qttools
34 ];
35 buildInputs = [
36 appstream
37 qtbase
38 qtsvg
39 qtquickcontrols2
40 qtwebview
41 itstool
42 librsvg
43 ];
44
45 patchPhase = ''
46 substituteInPlace pentobi_thumbnailer/CMakeLists.txt --replace "/manpages" "/share/xml/docbook-xsl/manpages/"
47 substituteInPlace pentobi/unix/CMakeLists.txt --replace "/manpages" "/share/xml/docbook-xsl/manpages/"
48 substituteInPlace pentobi/docbook/CMakeLists.txt --replace "/html" "/share/xml/docbook-xsl/html"
49 '';
50
51 cmakeFlags = [
52 "-DCMAKE_VERBOSE_MAKEFILE=1"
53 "-DDOCBOOKXSL_DIR=${docbook_xsl}"
54 "-DMETAINFO_ITS=${appstream}/share/gettext/its/metainfo.its"
55 ];
56
57 meta = with lib; {
58 description = "Computer opponent for the board game Blokus";
59 homepage = "https://pentobi.sourceforge.io";
60 license = licenses.gpl3Plus;
61 maintainers = [ ];
62 platforms = platforms.linux;
63 };
64}