about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/bitlbee
diff options
context:
space:
mode:
authorNadrieril <nadrieril@gmail.com>2017-07-02 18:58:31 +0100
committerNadrieril <nadrieril@gmail.com>2017-07-16 14:19:39 +0100
commitce6fe1a61be52e6cb6d0d0f11ec917d31a93a7b7 (patch)
tree14a806d8e3dfc5f4eb40eaf52f12463383812f98 /pkgs/applications/networking/instant-messengers/bitlbee
parent50831d543d37bb2953386922c6b5c7488f9028ba (diff)
bitlbee: Add optional libpurple dependency
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/bitlbee')
-rw-r--r--pkgs/applications/networking/instant-messengers/bitlbee/default.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/applications/networking/instant-messengers/bitlbee/default.nix b/pkgs/applications/networking/instant-messengers/bitlbee/default.nix
index 5ee93bd4df5b6..abb0a11729731 100644
--- a/pkgs/applications/networking/instant-messengers/bitlbee/default.nix
+++ b/pkgs/applications/networking/instant-messengers/bitlbee/default.nix
@@ -1,4 +1,5 @@
-{ fetchurl, fetchpatch, stdenv, gnutls, glib, pkgconfig, check, libotr, python }:
+{ fetchurl, fetchpatch, stdenv, gnutls, glib, pkgconfig, check, libotr, python,
+enableLibPurple ? false, pidgin ? null }:
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
@@ -11,20 +12,25 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig ] ++ optional doCheck check;
 
-  buildInputs = [ gnutls glib libotr python ];
+  buildInputs = [ gnutls glib libotr python ]
+    ++ optional enableLibPurple pidgin;
+
+  preConfigure = optionalString enableLibPurple
+    "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${pidgin}/lib/pkgconfig";
 
   configureFlags = [
     "--gcov=1"
     "--otr=1"
     "--ssl=gnutls"
     "--pidfile=/var/lib/bitlbee/bitlbee.pid"
-  ];
+  ]
+  ++ optional enableLibPurple "--purple=1";
 
-  buildPhase = ''
+  buildPhase = optionalString (!enableLibPurple) ''
     make install-dev
   '';
 
-  doCheck = true;
+  doCheck = !enableLibPurple; # Checks fail with libpurple for some reason
 
   meta = {
     description = "IRC instant messaging gateway";