Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b8d92a7840dd
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 04c944cdb4ec
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Jul 16, 2017

  1. Copy the full SHA
    ce6fe1a View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    65e38b7 View commit details

Commits on Jul 17, 2017

  1. Merge pull request #27057 from Nadrieril/bitlbee-libpurple

    bitlbee service: Add option to load libpurple plugins into bitlbee
    Mic92 authored Jul 17, 2017

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    04c944c View commit details
Showing with 35 additions and 8 deletions.
  1. +24 −3 nixos/modules/services/networking/bitlbee.nix
  2. +11 −5 pkgs/applications/networking/instant-messengers/bitlbee/default.nix
27 changes: 24 additions & 3 deletions nixos/modules/services/networking/bitlbee.nix
Original file line number Diff line number Diff line change
@@ -7,6 +7,10 @@ let
cfg = config.services.bitlbee;
bitlbeeUid = config.ids.uids.bitlbee;

bitlbeePkg = if cfg.libpurple_plugins == []
then pkgs.bitlbee
else pkgs.bitlbee.override { enableLibPurple = true; };

bitlbeeConfig = pkgs.writeText "bitlbee.conf"
''
[settings]
@@ -25,6 +29,12 @@ let
${cfg.extraDefaults}
'';

purple_plugin_path =
lib.concatMapStringsSep ":"
(plugin: "${plugin}/lib/pidgin/")
cfg.libpurple_plugins
;

in

{
@@ -90,6 +100,15 @@ in
'';
};

libpurple_plugins = mkOption {
type = types.listOf types.package;
default = [];
example = literalExample "[ pkgs.purple-matrix ]";
description = ''
The list of libpurple plugins to install.
'';
};

configDir = mkOption {
default = "/var/lib/bitlbee";
type = types.path;
@@ -144,14 +163,16 @@ in
};

systemd.services.bitlbee =
{ description = "BitlBee IRC to other chat networks gateway";
{
environment.PURPLE_PLUGIN_PATH = purple_plugin_path;
description = "BitlBee IRC to other chat networks gateway";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.User = "bitlbee";
serviceConfig.ExecStart = "${pkgs.bitlbee}/sbin/bitlbee -F -n -c ${bitlbeeConfig}";
serviceConfig.ExecStart = "${bitlbeePkg}/sbin/bitlbee -F -n -c ${bitlbeeConfig}";
};

environment.systemPackages = [ pkgs.bitlbee ];
environment.systemPackages = [ bitlbeePkg ];

};

Original file line number Diff line number Diff line change
@@ -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";