From 55f0f9e1a4818074c52d6e11e65240fbfdd36890 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= <code@andre-bubel.de>
Date: Thu, 8 Jun 2017 22:42:58 +0200
Subject: [PATCH] profanity: enable tray icon support

Profanity can show a tray icon, e.g. showing that messages were received.
This enables support for the feature.
---
 .../networking/instant-messengers/profanity/default.nix      | 5 ++++-
 pkgs/top-level/all-packages.nix                              | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix
index 32f4f8f32b3..e1a068393b1 100644
--- a/pkgs/applications/networking/instant-messengers/profanity/default.nix
+++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix
@@ -3,10 +3,12 @@
 
 , autoAwaySupport ? false, libXScrnSaver ? null, libX11 ? null
 , notifySupport ? false,   libnotify ? null, gdk_pixbuf ? null
+, traySupport ? false,     gnome2 ? null
 }:
 
 assert autoAwaySupport -> libXScrnSaver != null && libX11 != null;
 assert notifySupport   -> libnotify != null && gdk_pixbuf != null;
+assert traySupport     -> gnome2 != null;
 
 with stdenv.lib;
 
@@ -23,7 +25,8 @@ stdenv.mkDerivation rec {
     pkgconfig readline libuuid libmesode
     glib openssl expat ncurses libotr curl
   ] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ]
-    ++ optionals notifySupport   [ libnotify gdk_pixbuf ];
+    ++ optionals notifySupport   [ libnotify gdk_pixbuf ]
+    ++ optionals traySupport     [ gnome2.gtk ];
 
   meta = {
     description = "A console based XMPP client";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4962e3fa482..9d30f4c5a3e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -15482,6 +15482,7 @@ with pkgs;
 
   profanity = callPackage ../applications/networking/instant-messengers/profanity {
     notifySupport   = config.profanity.notifySupport   or true;
+    traySupport     = config.profanity.traySupport     or true;
     autoAwaySupport = config.profanity.autoAwaySupport or true;
   };