forked from mirrors/nixpkgs
f83d12d554
New features core: add variable "old_full_name" in buffer, set during buffer renaming (issue weechat/weechat#1428) core: add debug option "-d" in command /eval (issue weechat/weechat#1434) api: add functions crypto_hash and crypto_hash_pbkdf2 api: add info "auto_connect" (issue weechat/weechat#1453) api: add info "weechat_headless" (issue weechat/weechat#1433) buflist: add pointer "window" in bar item evaluation irc: add support of fake servers (no I/O, for testing purposes) relay: accept hash of password in init command of weechat protocol with option "password_hash" (PBKDF2, SHA256, SHA512) relay: reject client with weechat protocol if password or totp is received in init command but not set in WeeChat (issue weechat/weechat#1435) Bug fixes core: fix memory leak in completion core: flush stdout/stderr before forking in hook_process function (issue weechat/weechat#1441) core: fix evaluation of condition with nested "if" (issue weechat/weechat#1434) irc: split AUTHENTICATE message in 400-byte chunks (issue weechat/weechat#1459) irc: copy temporary server flag in command /server copy irc: add nick changes in the hotlist (except self nick change) irc: case-insensitive comparison on incoming CTCP command, force upper case on CTCP replies (issue weechat/weechat#1439) irc: fix memory leak when the channel topic is changed logger: fix crash when logging is disabled on a buffer and the log file was deleted in the meanwhile, when option logger.file.info_lines is on (issue weechat/weechat#1444) php: fix crash when loading script with PHP 7.4 (issue weechat/weechat#1452) relay: update buffers synchronization when buffers are renamed (issue weechat/weechat#1428) script: fix memory leak in read of script repository file if it has invalid content script: fix unexpected display of scripts list in buffer with command /script list -i xfer: send signal "xfer_ended" after the received file has been renamed (issue weechat/weechat#1438) Tests scripts: fix generation of test scripts with Python 3.8 unit: add tests on IRC protocol functions and callbacks unit: add tests on function secure_derive_key unit: add tests on functions util_get_time_diff and util_file_get_content Build core: fix Cygwin build guile: add detection of Guile 3.0.0 (issue weechat/weechat#1442) irc: fix build with GnuTLS < 3.1.0 (issue weechat/weechat#1431) php: add detection of PHP 7.4 ruby: add detection of Ruby 2.7 (issue weechat/weechat#1455)
85 lines
3.3 KiB
Nix
85 lines
3.3 KiB
Nix
{ stdenv, fetchurl, lib
|
|
, ncurses, openssl, aspell, gnutls, gettext
|
|
, zlib, curl, pkgconfig, libgcrypt
|
|
, cmake, makeWrapper, libobjc, libresolv, libiconv
|
|
, asciidoctor # manpages
|
|
, guileSupport ? true, guile
|
|
, luaSupport ? true, lua5
|
|
, perlSupport ? true, perl
|
|
, pythonSupport ? true, python3Packages
|
|
, rubySupport ? true, ruby
|
|
, tclSupport ? true, tcl
|
|
, extraBuildInputs ? []
|
|
}:
|
|
|
|
let
|
|
inherit (python3Packages) python;
|
|
plugins = [
|
|
{ name = "perl"; enabled = perlSupport; cmakeFlag = "ENABLE_PERL"; buildInputs = [ perl ]; }
|
|
{ name = "tcl"; enabled = tclSupport; cmakeFlag = "ENABLE_TCL"; buildInputs = [ tcl ]; }
|
|
{ name = "ruby"; enabled = rubySupport; cmakeFlag = "ENABLE_RUBY"; buildInputs = [ ruby ]; }
|
|
{ name = "guile"; enabled = guileSupport; cmakeFlag = "ENABLE_GUILE"; buildInputs = [ guile ]; }
|
|
{ name = "lua"; enabled = luaSupport; cmakeFlag = "ENABLE_LUA"; buildInputs = [ lua5 ]; }
|
|
{ name = "python"; enabled = pythonSupport; cmakeFlag = "ENABLE_PYTHON3"; buildInputs = [ python ]; }
|
|
];
|
|
enabledPlugins = builtins.filter (p: p.enabled) plugins;
|
|
|
|
in
|
|
assert lib.all (p: p.enabled -> ! (builtins.elem null p.buildInputs)) plugins;
|
|
stdenv.mkDerivation rec {
|
|
version = "2.8";
|
|
pname = "weechat";
|
|
|
|
src = fetchurl {
|
|
url = "https://weechat.org/files/src/weechat-${version}.tar.bz2";
|
|
sha256 = "0xpzl7985j47rpmly4r833jxd448xpy7chqphaxmhlql2c0gc08z";
|
|
};
|
|
|
|
outputs = [ "out" "man" ] ++ map (p: p.name) enabledPlugins;
|
|
|
|
enableParallelBuilding = true;
|
|
cmakeFlags = with stdenv.lib; [
|
|
"-DENABLE_MAN=ON"
|
|
"-DENABLE_DOC=ON"
|
|
"-DENABLE_JAVASCRIPT=OFF" # Requires v8 <= 3.24.3, https://github.com/weechat/weechat/issues/360
|
|
"-DENABLE_PHP=OFF"
|
|
]
|
|
++ optionals stdenv.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib" "-DCMAKE_FIND_FRAMEWORK=LAST"]
|
|
++ map (p: "-D${p.cmakeFlag}=" + (if p.enabled then "ON" else "OFF")) plugins
|
|
;
|
|
|
|
buildInputs = with stdenv.lib; [
|
|
ncurses openssl aspell gnutls gettext zlib curl pkgconfig
|
|
libgcrypt makeWrapper cmake asciidoctor
|
|
]
|
|
++ optionals stdenv.isDarwin [ libobjc libresolv ]
|
|
++ concatMap (p: p.buildInputs) enabledPlugins
|
|
++ extraBuildInputs;
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}"
|
|
# Fix '_res_9_init: undefined symbol' error
|
|
+ (stdenv.lib.optionalString stdenv.isDarwin "-DBIND_8_COMPAT=1 -lresolv");
|
|
|
|
postInstall = with stdenv.lib; ''
|
|
for p in ${concatMapStringsSep " " (p: p.name) enabledPlugins}; do
|
|
from=$out/lib/weechat/plugins/$p.so
|
|
to=''${!p}/lib/weechat/plugins/$p.so
|
|
mkdir -p $(dirname $to)
|
|
mv $from $to
|
|
done
|
|
'';
|
|
|
|
meta = {
|
|
homepage = http://www.weechat.org/;
|
|
description = "A fast, light and extensible chat client";
|
|
longDescription = ''
|
|
You can find more documentation as to how to customize this package
|
|
(eg. adding python modules for scripts that would require them, etc.)
|
|
on https://nixos.org/nixpkgs/manual/#sec-weechat .
|
|
'';
|
|
license = stdenv.lib.licenses.gpl3;
|
|
maintainers = with stdenv.lib.maintainers; [ lovek323 the-kenny lheckemann ma27 ];
|
|
platforms = stdenv.lib.platforms.unix;
|
|
};
|
|
}
|