git.iko.soy/typeable/nixpkgs
on master help sign in
weechat: add perl.withPackages (#48815)

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.

commite20e1e5c2cb247ed3c10d9560db7c3a509115674 authorAlyssa Ross <hi@alyssa.is> dateTue 23 Oct 2018, 10:23 (8 years ago) parentcc4b9ef
2 files changed+11−5
doc/package-notes.xml+4−4 pkgs/applications/networking/irc/weechat/default.nix+7−1
doc/package-notes.xml+4−4
@@ -681,10 +681,10 @@ overrides = self: super: rec {
681681 </para>
682682
683683 <para>
684− The python plugin allows the addition of extra libraries. For instance, the
685− <literal>inotify.py</literal> script in weechat-scripts requires D-Bus or
686− libnotify, and the <literal>fish.py</literal> script requires pycrypto. To
687− use these scripts, use the <literal>python</literal> plugin's
684+ The python and perl plugins allows the addition of extra libraries. For
685+ instance, the <literal>inotify.py</literal> script in weechat-scripts
686+ requires D-Bus or libnotify, and the <literal>fish.py</literal> script
687+ requires pycrypto. To use these scripts, use the plugin's
688688 <literal>withPackages</literal> attribute:
689689<programlisting>weechat.override { configure = {availablePlugins, ...}: {
690690 plugins = with availablePlugins; [
pkgs/applications/networking/irc/weechat/default.nix+7−1
@@ -6,7 +6,7 @@
66, asciidoctor # manpages
77, guileSupport ? true, guile
88, luaSupport ? true, lua5
9−, perlSupport ? true, perl
9+, perlSupport ? true, perl, perlPackages
1010, pythonSupport ? true, pythonPackages
1111, rubySupport ? true, ruby
1212, tclSupport ? true, tcl
@@ -108,6 +108,12 @@ in if configure == null then weechat else
108108 extraEnv = ''
109109 export PATH="${perlInterpreter}/bin:$PATH"
110110 '';
111+ withPackages = pkgsFun: (perl // {
112+ extraEnv = ''
113+ ${perl.extraEnv}
114+ export PERL5LIB=${lib.makeFullPerlPath (pkgsFun perlPackages)}
115+ '';
116+ });
111117 };
112118 tcl = simplePlugin "tcl";
113119 ruby = simplePlugin "ruby";