summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/package-notes.xml8
-rw-r--r--pkgs/applications/networking/irc/weechat/default.nix8
2 files changed, 11 insertions, 5 deletions
diff --git a/doc/package-notes.xml b/doc/package-notes.xml
index dad28d3ec8b2..49f94f3bd5d2 100644
--- a/doc/package-notes.xml
+++ b/doc/package-notes.xml
@@ -681,10 +681,10 @@ overrides = self: super: rec {
   </para>
 
   <para>
-   The python plugin allows the addition of extra libraries. For instance, the
-   <literal>inotify.py</literal> script in weechat-scripts requires D-Bus or
-   libnotify, and the <literal>fish.py</literal> script requires pycrypto. To
-   use these scripts, use the <literal>python</literal> plugin's
+   The python and perl plugins allows the addition of extra libraries. For
+   instance, the <literal>inotify.py</literal> script in weechat-scripts
+   requires D-Bus or libnotify, and the <literal>fish.py</literal> script
+   requires pycrypto. To use these scripts, use the plugin's
    <literal>withPackages</literal> attribute:
 <programlisting>weechat.override { configure = {availablePlugins, ...}: {
     plugins = with availablePlugins; [
diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix
index bf5d06423142..513407a0b710 100644
--- a/pkgs/applications/networking/irc/weechat/default.nix
+++ b/pkgs/applications/networking/irc/weechat/default.nix
@@ -6,7 +6,7 @@
 , asciidoctor # manpages
 , guileSupport ? true, guile
 , luaSupport ? true, lua5
-, perlSupport ? true, perl
+, perlSupport ? true, perl, perlPackages
 , pythonSupport ? true, pythonPackages
 , rubySupport ? true, ruby
 , tclSupport ? true, tcl
@@ -108,6 +108,12 @@ in if configure == null then weechat else
           extraEnv = ''
             export PATH="${perlInterpreter}/bin:$PATH"
           '';
+          withPackages = pkgsFun: (perl // {
+            extraEnv = ''
+              ${perl.extraEnv}
+              export PERL5LIB=${lib.makeFullPerlPath (pkgsFun perlPackages)}
+            '';
+          });
         };
         tcl = simplePlugin "tcl";
         ruby = simplePlugin "ruby";