git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #9711 from anderspapitto/bitlbee

plugin support for bitlbee, and facebook plugin

commit90a7bb69d076292d4955708d6cb29efa8b84951e authorArseniy Seroka <jagajaga@users.noreply.github.com> dateWed 9 Sep 2015, 03:03 (11 years ago) parentabb8fc378f7a09
5 files changed+75−6
nixos/modules/services/networking/bitlbee.nix+15−5 pkgs/applications/networking/instant-messengers/bitlbee-facebook/default.nix+27 pkgs/applications/networking/instant-messengers/bitlbee/default.nix+10−1 pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix+20 pkgs/top-level/all-packages.nix+3
nixos/modules/services/networking/bitlbee.nix+15−5
@@ -16,11 +16,12 @@ let
1616 ''
1717 [settings]
1818 RunMode = Daemon
19− User = bitlbee
19+ User = bitlbee
2020 ConfigDir = ${cfg.configDir}
2121 DaemonInterface = ${cfg.interface}
2222 DaemonPort = ${toString cfg.portNumber}
2323 AuthMode = ${cfg.authMode}
24+ Plugindir = ${pkgs.bitlbee-plugins cfg.plugins}/lib/bitlbee
2425 ${lib.optionalString (cfg.hostName != "") "HostName = ${cfg.hostName}"}
2526 ${lib.optionalString (cfg.protocols != "") "Protocols = ${cfg.protocols}"}
2627 ${cfg.extraSettings}
@@ -72,7 +73,7 @@ in
7273 Open -- Accept connections from anyone, use NickServ for user authentication.
7374 Closed -- Require authorization (using the PASS command during login) before allowing the user to connect at all.
7475 Registered -- Only allow registered users to use this server; this disables the register- and the account command until the user identifies himself.
75− '';
76+ '';
7677 };
7778
7879 hostName = mkOption {
@@ -85,6 +86,15 @@ in
8586 '';
8687 };
8788
89+ plugins = mkOption {
90+ type = types.listOf types.package;
91+ default = [];
92+ example = literalExample "[ pkgs.bitlbee-facebook ]";
93+ description = ''
94+ The list of bitlbee plugins to install.
95+ '';
96+ };
97+
8898 configDir = mkOption {
8999 default = "/var/lib/bitlbee";
90100 type = types.path;
@@ -107,14 +117,14 @@ in
107117 default = "";
108118 description = ''
109119 Will be inserted in the Settings section of the config file.
110− '';
120+ '';
111121 };
112122
113123 extraDefaults = mkOption {
114124 default = "";
115125 description = ''
116126 Will be inserted in the Default section of the config file.
117− '';
127+ '';
118128 };
119129
120130 };
@@ -138,7 +148,7 @@ in
138148 gid = config.ids.gids.bitlbee;
139149 };
140150
141− systemd.services.bitlbee =
151+ systemd.services.bitlbee =
142152 { description = "BitlBee IRC to other chat networks gateway";
143153 after = [ "network.target" ];
144154 wantedBy = [ "multi-user.target" ];
pkgs/applications/networking/instant-messengers/bitlbee-facebook/default.nixnew file+27
@@ -0,0 +1,27 @@
1+{ fetchurl, fetchFromGitHub, stdenv, bitlbee, autoconf, automake, libtool, pkgconfig, glib, json_glib }:
2+
3+with stdenv.lib;
4+stdenv.mkDerivation rec {
5+ name = "bitlbee-facebook-2015-08-27";
6+
7+ src = fetchFromGitHub {
8+ rev = "094a11b542e2cd8fac4f00fe01870ecd1cb4c062";
9+ owner = "jgeboski";
10+ repo = "bitlbee-facebook";
11+ sha256 = "1dvbl1z6fl3wswvqbs82vkqlggk24dyi8w7cmm5jh1fmaznmwqrl";
12+ };
13+
14+ buildInputs = [ bitlbee autoconf automake libtool pkgconfig glib json_glib ];
15+
16+ preConfigure = ''
17+ export BITLBEE_PLUGINDIR=$out/lib/bitlbee
18+ ./autogen.sh
19+ '';
20+
21+ meta = {
22+ description = "The Facebook protocol plugin for bitlbee";
23+
24+ homepage = https://github.com/jgeboski/bitlbee-facebook;
25+ license = licenses.gpl2Plus;
26+ };
27+}
pkgs/applications/networking/instant-messengers/bitlbee/default.nix+10−1
@@ -1,4 +1,4 @@
1−{ fetchurl, stdenv, gnutls, glib, pkgconfig, check, libotr, python }:
1+{ fetchurl, fetchpatch, stdenv, gnutls, glib, pkgconfig, check, libotr, python }:
22
33with stdenv.lib;
44stdenv.mkDerivation rec {
@@ -12,12 +12,21 @@ stdenv.mkDerivation rec {
1212 buildInputs = [ gnutls glib pkgconfig libotr python ]
1313 ++ optional doCheck check;
1414
15+ patches = [(fetchpatch {
16+ url = "https://github.com/bitlbee/bitlbee/commit/34d16d5b4b5265990125894572a90493284358cd.patch";
17+ sha256 = "05in9kxabb6s2c1l4b9ry58ppfciwmwzrkaq33df2zv0pr3z7w33";
18+ })];
19+
1520 configureFlags = [
1621 "--gcov=1"
1722 "--otr=1"
1823 "--ssl=gnutls"
1924 ];
2025
26+ buildPhase = ''
27+ make install-dev
28+ '';
29+
2130 doCheck = true;
2231
2332 meta = {
pkgs/applications/networking/instant-messengers/bitlbee/plugins.nixnew file+20
@@ -0,0 +1,20 @@
1+{ stdenv, bitlbee }:
2+
3+with stdenv.lib;
4+
5+plugins:
6+
7+stdenv.mkDerivation {
8+ inherit bitlbee plugins;
9+ name = "bitlbee-plugins";
10+ buildInputs = [ bitlbee plugins ];
11+ phases = [ "installPhase" ];
12+ installPhase = ''
13+ mkdir -p $out/lib/bitlbee
14+ for plugin in $plugins; do
15+ for thing in $(ls $plugin/lib/bitlbee); do
16+ ln -s $plugin/lib/bitlbee/$thing $out/lib/bitlbee/
17+ done
18+ done
19+ '';
20+}
pkgs/top-level/all-packages.nix+3
@@ -10887,6 +10887,9 @@ let
1088710887 bibletime = callPackage ../applications/misc/bibletime { };
1088810888
1088910889 bitlbee = callPackage ../applications/networking/instant-messengers/bitlbee { };
10890+ bitlbee-plugins = callPackage ../applications/networking/instant-messengers/bitlbee/plugins.nix { };
10891+
10892+ bitlbee-facebook = callPackage ../applications/networking/instant-messengers/bitlbee-facebook { };
1089010893
1089110894 bitmeter = callPackage ../applications/audio/bitmeter { };
1089210895