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.
This commit is contained in:
parent
cc4b9ef40f
commit
e20e1e5c2c
|
@ -681,10 +681,10 @@ overrides = self: super: rec {
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The python plugin allows the addition of extra libraries. For instance, the
|
The python and perl plugins allows the addition of extra libraries. For
|
||||||
<literal>inotify.py</literal> script in weechat-scripts requires D-Bus or
|
instance, the <literal>inotify.py</literal> script in weechat-scripts
|
||||||
libnotify, and the <literal>fish.py</literal> script requires pycrypto. To
|
requires D-Bus or libnotify, and the <literal>fish.py</literal> script
|
||||||
use these scripts, use the <literal>python</literal> plugin's
|
requires pycrypto. To use these scripts, use the plugin's
|
||||||
<literal>withPackages</literal> attribute:
|
<literal>withPackages</literal> attribute:
|
||||||
<programlisting>weechat.override { configure = {availablePlugins, ...}: {
|
<programlisting>weechat.override { configure = {availablePlugins, ...}: {
|
||||||
plugins = with availablePlugins; [
|
plugins = with availablePlugins; [
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
, asciidoctor # manpages
|
, asciidoctor # manpages
|
||||||
, guileSupport ? true, guile
|
, guileSupport ? true, guile
|
||||||
, luaSupport ? true, lua5
|
, luaSupport ? true, lua5
|
||||||
, perlSupport ? true, perl
|
, perlSupport ? true, perl, perlPackages
|
||||||
, pythonSupport ? true, pythonPackages
|
, pythonSupport ? true, pythonPackages
|
||||||
, rubySupport ? true, ruby
|
, rubySupport ? true, ruby
|
||||||
, tclSupport ? true, tcl
|
, tclSupport ? true, tcl
|
||||||
|
@ -108,6 +108,12 @@ in if configure == null then weechat else
|
||||||
extraEnv = ''
|
extraEnv = ''
|
||||||
export PATH="${perlInterpreter}/bin:$PATH"
|
export PATH="${perlInterpreter}/bin:$PATH"
|
||||||
'';
|
'';
|
||||||
|
withPackages = pkgsFun: (perl // {
|
||||||
|
extraEnv = ''
|
||||||
|
${perl.extraEnv}
|
||||||
|
export PERL5LIB=${lib.makeFullPerlPath (pkgsFun perlPackages)}
|
||||||
|
'';
|
||||||
|
});
|
||||||
};
|
};
|
||||||
tcl = simplePlugin "tcl";
|
tcl = simplePlugin "tcl";
|
||||||
ruby = simplePlugin "ruby";
|
ruby = simplePlugin "ruby";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user