Merge pull request #9711 from anderspapitto/bitlbee

plugin support for bitlbee, and facebook plugin
This commit is contained in:
Arseniy Seroka 2015-09-09 03:03:53 +03:00
commit 90a7bb69d0
5 changed files with 75 additions and 6 deletions

View File

@ -21,6 +21,7 @@ let
DaemonInterface = ${cfg.interface} DaemonInterface = ${cfg.interface}
DaemonPort = ${toString cfg.portNumber} DaemonPort = ${toString cfg.portNumber}
AuthMode = ${cfg.authMode} AuthMode = ${cfg.authMode}
Plugindir = ${pkgs.bitlbee-plugins cfg.plugins}/lib/bitlbee
${lib.optionalString (cfg.hostName != "") "HostName = ${cfg.hostName}"} ${lib.optionalString (cfg.hostName != "") "HostName = ${cfg.hostName}"}
${lib.optionalString (cfg.protocols != "") "Protocols = ${cfg.protocols}"} ${lib.optionalString (cfg.protocols != "") "Protocols = ${cfg.protocols}"}
${cfg.extraSettings} ${cfg.extraSettings}
@ -85,6 +86,15 @@ in
''; '';
}; };
plugins = mkOption {
type = types.listOf types.package;
default = [];
example = literalExample "[ pkgs.bitlbee-facebook ]";
description = ''
The list of bitlbee plugins to install.
'';
};
configDir = mkOption { configDir = mkOption {
default = "/var/lib/bitlbee"; default = "/var/lib/bitlbee";
type = types.path; type = types.path;

View File

@ -0,0 +1,27 @@
{ fetchurl, fetchFromGitHub, stdenv, bitlbee, autoconf, automake, libtool, pkgconfig, glib, json_glib }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "bitlbee-facebook-2015-08-27";
src = fetchFromGitHub {
rev = "094a11b542e2cd8fac4f00fe01870ecd1cb4c062";
owner = "jgeboski";
repo = "bitlbee-facebook";
sha256 = "1dvbl1z6fl3wswvqbs82vkqlggk24dyi8w7cmm5jh1fmaznmwqrl";
};
buildInputs = [ bitlbee autoconf automake libtool pkgconfig glib json_glib ];
preConfigure = ''
export BITLBEE_PLUGINDIR=$out/lib/bitlbee
./autogen.sh
'';
meta = {
description = "The Facebook protocol plugin for bitlbee";
homepage = https://github.com/jgeboski/bitlbee-facebook;
license = licenses.gpl2Plus;
};
}

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv, gnutls, glib, pkgconfig, check, libotr, python }: { fetchurl, fetchpatch, stdenv, gnutls, glib, pkgconfig, check, libotr, python }:
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -12,12 +12,21 @@ stdenv.mkDerivation rec {
buildInputs = [ gnutls glib pkgconfig libotr python ] buildInputs = [ gnutls glib pkgconfig libotr python ]
++ optional doCheck check; ++ optional doCheck check;
patches = [(fetchpatch {
url = "https://github.com/bitlbee/bitlbee/commit/34d16d5b4b5265990125894572a90493284358cd.patch";
sha256 = "05in9kxabb6s2c1l4b9ry58ppfciwmwzrkaq33df2zv0pr3z7w33";
})];
configureFlags = [ configureFlags = [
"--gcov=1" "--gcov=1"
"--otr=1" "--otr=1"
"--ssl=gnutls" "--ssl=gnutls"
]; ];
buildPhase = ''
make install-dev
'';
doCheck = true; doCheck = true;
meta = { meta = {

View File

@ -0,0 +1,20 @@
{ stdenv, bitlbee }:
with stdenv.lib;
plugins:
stdenv.mkDerivation {
inherit bitlbee plugins;
name = "bitlbee-plugins";
buildInputs = [ bitlbee plugins ];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/lib/bitlbee
for plugin in $plugins; do
for thing in $(ls $plugin/lib/bitlbee); do
ln -s $plugin/lib/bitlbee/$thing $out/lib/bitlbee/
done
done
'';
}

View File

@ -10887,6 +10887,9 @@ let
bibletime = callPackage ../applications/misc/bibletime { }; bibletime = callPackage ../applications/misc/bibletime { };
bitlbee = callPackage ../applications/networking/instant-messengers/bitlbee { }; bitlbee = callPackage ../applications/networking/instant-messengers/bitlbee { };
bitlbee-plugins = callPackage ../applications/networking/instant-messengers/bitlbee/plugins.nix { };
bitlbee-facebook = callPackage ../applications/networking/instant-messengers/bitlbee-facebook { };
bitmeter = callPackage ../applications/audio/bitmeter { }; bitmeter = callPackage ../applications/audio/bitmeter { };