3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/irc/weechat/scripts/weechat-xmpp/libpath.patch
Maximilian Bosch a8efe61412
weechat: 2.1 -> 2.2; improve package configuration
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.
2018-09-07 13:10:43 +02:00

17 lines
245 B
Diff

diff --git a/jabber.py b/jabber.py
index 27006a3..e53c2c0 100644
--- a/jabber.py
+++ b/jabber.py
@@ -95,6 +95,11 @@ SCRIPT_COMMAND = SCRIPT_NAME
import re
import warnings
+import sys
+
+sys.path.append('@env@')
+
+
import_ok = True
try: