bitlbee service: enable plugins

This commit is contained in:
Anders Papitto 2015-09-08 12:15:41 -07:00
parent 207f74eee9
commit 78f7a09e3a
3 changed files with 37 additions and 5 deletions

View File

@ -21,6 +21,7 @@ let
DaemonInterface = ${cfg.interface}
DaemonPort = ${toString cfg.portNumber}
AuthMode = ${cfg.authMode}
Plugindir = ${pkgs.bitlbee-plugins cfg.plugins}/lib/bitlbee
${lib.optionalString (cfg.hostName != "") "HostName = ${cfg.hostName}"}
${lib.optionalString (cfg.protocols != "") "Protocols = ${cfg.protocols}"}
${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 {
default = "/var/lib/bitlbee";
type = types.path;

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

@ -10829,6 +10829,8 @@ let
bibletime = callPackage ../applications/misc/bibletime { };
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 { };