bitlbee: Add optional libpurple dependency

This commit is contained in:
Nadrieril 2017-07-02 18:58:31 +01:00
parent 50831d543d
commit ce6fe1a61b

View File

@ -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; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -11,20 +12,25 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ] ++ optional doCheck check; 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 = [ configureFlags = [
"--gcov=1" "--gcov=1"
"--otr=1" "--otr=1"
"--ssl=gnutls" "--ssl=gnutls"
"--pidfile=/var/lib/bitlbee/bitlbee.pid" "--pidfile=/var/lib/bitlbee/bitlbee.pid"
]; ]
++ optional enableLibPurple "--purple=1";
buildPhase = '' buildPhase = optionalString (!enableLibPurple) ''
make install-dev make install-dev
''; '';
doCheck = true; doCheck = !enableLibPurple; # Checks fail with libpurple for some reason
meta = { meta = {
description = "IRC instant messaging gateway"; description = "IRC instant messaging gateway";