forked from mirrors/nixpkgs
This aims to make the `weechat` package even more configurable. It allows to specify scripts and commands using the `configure` function inside a `weechat.override` expression. The package can be configured like this: ``` with import <nixpkgs> { }; weechat.override { plugins = { availablePlugins, ... }: { plugins = builtins.attrValues availablePlugins; init = '' /set foo bar /server add freenode chat.freenode.org ''; scripts = [ "/path/to/script.py" ]; }; } ``` All commands are passed to `weechat --run-command "/set foo bar;/server ..."`. The `plugins' attribute is not necessarily required anymore, if it's sufficient to add `init' commands, the `plugins' will be `builtins.attrValues availablePlugins' by default. Additionally the result contains `weechat` and `weechat-headless` (introduced in WeeChat 2.1) now.
37 lines
906 B
Nix
37 lines
906 B
Nix
{ stdenv, fetchFromGitHub, xmpppy, pydns, substituteAll, buildEnv }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "weechat-jabber-2017-08-30";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "weechat-xmpp";
|
|
owner = "sleduc";
|
|
sha256 = "0s02xs0ynld9cxxzj07al364sfglyc5ir1i82133mq0s8cpphnxv";
|
|
rev = "8f6c21f5a160c9318c7a2d8fd5dcac7ab2e0d843";
|
|
};
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share
|
|
cp jabber.py $out/share/jabber.py
|
|
'';
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./libpath.patch;
|
|
env = "${buildEnv {
|
|
name = "weechat-xmpp-env";
|
|
paths = [ pydns xmpppy ];
|
|
}}/lib/python2.7/site-packages";
|
|
})
|
|
];
|
|
|
|
passthru.scripts = [ "jabber.py" ];
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A fork of the jabber plugin for weechat";
|
|
homepage = "https://github.com/sleduc/weechat-xmpp";
|
|
maintainers = with maintainers; [ ma27 ];
|
|
license = licenses.gpl3Plus;
|
|
};
|
|
}
|