Changelog [1]:
New features
- core: use getopt to parse command line arguments
- core: add option weechat.look.prefix_same_nick_middle
- core: add option weechat.look.buffer_time_same
- core: use seconds by default in /repeat interval, allow unit for the interval
- core: allow text in addition to a command in command /repeat
- core: add option "addreplace" in command /filter
- api: return allocated string in hook_info callback and function info_get
- api: replace argument "keep_eol" by "flags" in function string_split
- api: add function command_options
- api: add function string_match_list
- irc: add bar items "irc_nick", "irc_host" and "irc_nick_host"
- irc: add variable "host" in server structure
- relay: add support of UNIX socket
- relay: add option relay.weechat.commands
- script: use SHA-512 instead of MD5 for script checksum
- spell: rename aspell plugin to spell
- trigger: add hooks "info" and "info_hashtable"
- xfer: rename option xfer.network.speed_limit to xfer.network.speed_limit_send, add option xfer.network.speed_limit_recv
Bug fixes
- core: don’t execute command scheduled by /repeat and /wait if the buffer does not exist any more
- core: set max length to 4096 for /secure passphrase
- core: refilter only affected buffers on filter change
- fset: fix slow refresh of fset buffer during /reload
- irc: fix parsing of MODE command when there are colons after the first mode argument
- irc: fix memory leak in infos "irc_server_isupport" and "irc_server_isupport_value"
- irc: fix length of string for SHA-512, SHA-256 and SHA-1 in help on ssl_fingerprint option
- irc: display an error with /allchan -current or /allpv -current if the current buffer is not an irc buffer
- irc: fix update of channels modes with arguments when joining a channel
- irc: quote NICK command argument sent to the server
- php: fix memory leak in functions string_eval_expression, string_eval_path_home, key_bind, hook_process_hashtable, hook_hsignal_send, info_get_hashtable, hdata_update
- relay: fix crash when a weechat relay client reloads the relay plugin with /plugin reload relay
- spell: fix detection of nick followed by the nick completer
- trigger: fix split of hook arguments
Tests
- unit: add tests on function util_signal_search
Build
- core: fix value of libdir in file weechat.pc
- core: fix generation of man page weechat-headless with autotools
- core: add CMake option "ENABLE_CODE_COVERAGE" to compile with code coverage options (CMake ≥ 3.0 is now required)
- core: fix compilation on Mac OS
- lua: add detection of Lua 5.3 with autotools
- ruby: add detection of Ruby 2.6
- tests: fix compilation of tests on FreeBSD
[1] https://weechat.org/files/changelog/ChangeLog-2.5.html#v2.5
Resolves#59300
Until now only `$out/bin/weechat` and `$out/bin/weechat-headless` were installed
into the store path that will be used when running i.e. `nix-env -iA weechat`.
Further outputs like icons (`$out/share/icons`), man pages (`$man`) or the HTML
documentation (`$out/share/doc/weechat`) are omitted at the moment. As
this can be fairly confusing I figured that it's better to copy those
files into the environment as well.
As `buildEnv` doesn't appear to support output splitting (you can only
install additional outputs of `paths` using `extraOutputsToInstall`),
it's easier for now to always install the `man` output by
default.
Man page installation can be turned off like this now:
```
weechat.override { installManPages = false; }
```
Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
In particular we move the src into the actual quassel derivation
instead of using a `source.nix`.
Also use `fetchFromGitHub` since using `fetchurl` for github archives
is problematic.
Identified in 8887e1f697 (r239097413).
9504292b1e accidentally reverted all the
changes that had been made to the weechat wrapper since
8887e1f697.
I removed the wrapper, then wrote it again, but this time taking the
code from the latest version of weechat before the bad merge.
Allows for adding Perl libraries in the same way as for Python. Doesn't
really need to be a function, since there's only one perlPackages in
nixpkgs, but I went for consistency with the python plugin.
Loading olm.lua as weechat script with `/script load olm.lua' causes
errors like this:
```
/nix/store/43jbh7yxh8j4gjfzbvpd9clncah5dip1-weechat-matrix-bridge-2018-05-29/lib/ffi.so: undefined symbol: lua_tointeger
```
As `olm.lua' is loaded by `matrix.lua' it doesn't need to be included
manually by the weechat configuration.
In my previous PR I missed that ${sec.foobar} (syntax to retrieve
secrets in a weechat runtime) breaks the shell evaluation.
Furthermore `;` shall be used rather than `\n` to concat scripts and the
init config.
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.
If I have a patch I want to apply to weechat, I can't do that with
overrideAttrs like I can with almost every other package, because that
only applies to the wrapper derivation. For other wrapped packages, one
can usually call the wrapper with any version of the derivation, but the
weechat derivation didn't expose a wrapper creation function.
Taking inspiration from other packages, particularly Firefox, I
extracted the wrapper into its own function, made the default weechat
derivation use that, and added weechat-unwrapped.
Now I can add my custom patch like this:
(wrapWeechat
(weechat-unwrapped.overrideAttrs (oldAttrs: {
patches = [
(fetchpatch {
url = "55767f5f11.patch?full_index=1";
sha256 = "1pkcdsby57diqds1y5hhl0fr4i8j0zax32jb0gqd36siki3lza3d";
})
];
}))
{ configure =
{ availablePlugins, ... }:
{
plugins = with availablePlugins; [
(python.withPackages (packages: with packages; [ potr websocket_client ]))
];
};
})
There is a small backward incompatibility here: previously, it was
possible to get an unwrapped weechat like this:
weechat.override { configure = null; }
This didn't seem too important to keep around since it was also possible
to get an unwrapped weechat in a much more obvious way:
weechat.unwrapped
I could probably make it so that the first way still worked, if that
behavior turns out to really have been important.