diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-10-11 00:05:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 00:05:26 +0000 |
commit | 5d957f3dbadfebd9c86c1e996af2c6eee391f742 (patch) | |
tree | f9b5d8c4924207e79d1d19d50b6a60b04ab8a1cd /pkgs/applications/networking/irc | |
parent | f5fb6e575534508dbc3aff2c778956983e189d19 (diff) | |
parent | e3419ce322b50618ac728a62715168f3e5d37f9e (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/applications/networking/irc')
-rw-r--r-- | pkgs/applications/networking/irc/weechat/default.nix | 25 | ||||
-rw-r--r-- | pkgs/applications/networking/irc/weechat/wrapper.nix | 8 |
2 files changed, 23 insertions, 10 deletions
diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index 4631cef04fa13..132504a20e164 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -1,20 +1,25 @@ { stdenv, fetchurl, lib , ncurses, openssl, aspell, gnutls, gettext , zlib, curl, pkg-config, libgcrypt -, cmake, makeWrapper, libobjc, libresolv, libiconv +, cmake, libobjc, libresolv, libiconv , asciidoctor # manpages +, enableTests ? !stdenv.isDarwin, cpputest , guileSupport ? true, guile , luaSupport ? true, lua5 , perlSupport ? true, perl , pythonSupport ? true, python3Packages , rubySupport ? true, ruby , tclSupport ? true, tcl +, phpSupport ? !stdenv.isDarwin, php, systemd, libxml2, pcre2, libargon2 , extraBuildInputs ? [] -, fetchpatch }: let inherit (python3Packages) python; + php-embed = php.override { + embedSupport = true; + apxs2Support = false; + }; plugins = [ { name = "perl"; enabled = perlSupport; cmakeFlag = "ENABLE_PERL"; buildInputs = [ perl ]; } { name = "tcl"; enabled = tclSupport; cmakeFlag = "ENABLE_TCL"; buildInputs = [ tcl ]; } @@ -22,35 +27,37 @@ let { 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 ]; } + { name = "php"; enabled = phpSupport; cmakeFlag = "ENABLE_PHP"; buildInputs = [ + php-embed.unwrapped.dev libxml2 pcre2 libargon2 + ] ++ lib.optional stdenv.isLinux systemd; } ]; enabledPlugins = builtins.filter (p: p.enabled) plugins; in assert lib.all (p: p.enabled -> ! (builtins.elem null p.buildInputs)) plugins; stdenv.mkDerivation rec { - version = "3.6"; + version = "3.7"; pname = "weechat"; hardeningEnable = [ "pie" ]; src = fetchurl { url = "https://weechat.org/files/src/weechat-${version}.tar.bz2"; - sha256 = "sha256-GkYN/Y4LQQr7GdSDu0ucXXM9wWPAqKD1txJXkOhJMDc="; + hash = "sha256-n5kvC//h85c4IvkrCVTz+F0DcCC5rdRkvj8W3fUPXI8="; }; outputs = [ "out" "man" ] ++ map (p: p.name) enabledPlugins; cmakeFlags = with lib; [ "-DENABLE_MAN=ON" - "-DENABLE_DOC=OFF" # TODO: Documentation fails to build, was deactivated to push through security update - "-DENABLE_JAVASCRIPT=OFF" # Requires v8 <= 3.24.3, https://github.com/weechat/weechat/issues/360 - "-DENABLE_PHP=OFF" + "-DENABLE_DOC=OFF" # TODO(@ncfavier): Documentation fails to build, was deactivated to push through security update + "-DENABLE_TESTS=${if enableTests then "ON" else "OFF"}" ] ++ optionals stdenv.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib"] ++ map (p: "-D${p.cmakeFlag}=" + (if p.enabled then "ON" else "OFF")) plugins ; - nativeBuildInputs = [ cmake pkg-config makeWrapper asciidoctor ]; + nativeBuildInputs = [ cmake pkg-config asciidoctor ] ++ lib.optional enableTests cpputest; buildInputs = with lib; [ ncurses openssl aspell gnutls gettext zlib curl libgcrypt ] @@ -85,7 +92,7 @@ let on https://nixos.org/nixpkgs/manual/#sec-weechat . ''; license = lib.licenses.gpl3; - maintainers = with lib.maintainers; [ lovek323 ]; + maintainers = with lib.maintainers; [ ncfavier ]; platforms = lib.platforms.unix; }; } diff --git a/pkgs/applications/networking/irc/weechat/wrapper.nix b/pkgs/applications/networking/irc/weechat/wrapper.nix index 5c06bb8517a29..353b7ffd6fda4 100644 --- a/pkgs/applications/networking/irc/weechat/wrapper.nix +++ b/pkgs/applications/networking/irc/weechat/wrapper.nix @@ -7,7 +7,11 @@ weechat: let wrapper = { installManPages ? true - , configure ? { availablePlugins, ... }: { plugins = builtins.attrValues availablePlugins; } + , configure ? { availablePlugins, ... }: { + # Do not include PHP by default, because it bloats the closure, doesn't + # build on Darwin, and there are no official PHP scripts. + plugins = builtins.attrValues (builtins.removeAttrs availablePlugins [ "php" ]); + } }: let @@ -21,6 +25,7 @@ let ''; withPackages = pkgsFun: (python // { extraEnv = '' + ${python.extraEnv} export PYTHONHOME="${python3Packages.python.withPackages pkgsFun}" ''; }); @@ -40,6 +45,7 @@ let ruby = simplePlugin "ruby"; guile = simplePlugin "guile"; lua = simplePlugin "lua"; + php = simplePlugin "php"; }; config = configure { inherit availablePlugins; }; |