1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 cmake,
6 pkg-config,
7 gtk3,
8 gspell,
9 gmime3,
10 gettext,
11 intltool,
12 itstool,
13 libxml2,
14 libnotify,
15 gnutls,
16 wrapGAppsHook3,
17 gnupg,
18 spellChecking ? true,
19 gnomeSupport ? true,
20 libsecret,
21 gcr,
22}:
23
24stdenv.mkDerivation (finalAttrs: {
25 pname = "pan";
26 version = "0.164";
27
28 src = fetchFromGitLab {
29 domain = "gitlab.gnome.org";
30 owner = "GNOME";
31 repo = "pan";
32 tag = "v${finalAttrs.version}";
33 hash = "sha256-fVhjgnDvDf5rmhuW27UpEp3m7o8FFcpakVcGBhBic0Y=";
34 };
35
36 nativeBuildInputs = [
37 cmake
38 pkg-config
39 gettext
40 intltool
41 itstool
42 libxml2
43 wrapGAppsHook3
44 ];
45
46 buildInputs = [
47 gtk3
48 gmime3
49 libnotify
50 gnutls
51 ]
52 ++ lib.optionals spellChecking [ gspell ]
53 ++ lib.optionals gnomeSupport [
54 libsecret
55 gcr
56 ];
57
58 cmakeFlags = [
59 (lib.cmakeBool "WANT_GSPELL" spellChecking)
60 (lib.cmakeBool "WANT_GKR" gnomeSupport)
61 (lib.cmakeBool "ENABLE_MANUAL" true)
62 (lib.cmakeBool "WANT_GMIME_CRYPTO" true)
63 (lib.cmakeBool "WANT_WEBKIT" false) # We don't have webkitgtk_3_0
64 (lib.cmakeBool "WANT_NOTIFY" true)
65 ];
66
67 preFixup = ''
68 gappsWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ gnupg ]})
69 '';
70
71 meta = {
72 description = "GTK-based Usenet newsreader good at both text and binaries";
73 mainProgram = "pan";
74 homepage = "http://pan.rebelbase.com";
75 maintainers = with lib.maintainers; [
76 aleksana
77 ];
78 platforms = lib.platforms.linux;
79 license = with lib.licenses; [
80 gpl2Only
81 fdl11Only
82 ];
83 };
84})