Perl: Difference between revisions

imported>Raboof
document caveats running a perl script
imported>NieDzejkob
describe wrapping PERL5LIB
Line 12: Line 12:
* After reviewing the result from the previous step and making appropriate modifications, add it to <code>pkgs/top-level/perl-packages.nix</code>.  Note that some things use <code>buildPerlPackage</code> while some use <code>buildPerlModule</code>.  Also note the mostly-followed naming convention as well as the mostly-followed alphabetical ordering. There are plenty of examples in <tt>perl-packages.nix</tt> &mdash; use the source, Luke!
* After reviewing the result from the previous step and making appropriate modifications, add it to <code>pkgs/top-level/perl-packages.nix</code>.  Note that some things use <code>buildPerlPackage</code> while some use <code>buildPerlModule</code>.  Also note the mostly-followed naming convention as well as the mostly-followed alphabetical ordering. There are plenty of examples in <tt>perl-packages.nix</tt> &mdash; use the source, Luke!
* Build and test.
* Build and test.
==Wrappers for installed programs==
To make perl modules available to a program in your derivation:
* add <code>makeWrapper</code> to <code>buildInputs</code>
* run <code>wrapProgram $pathToScript --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.Whatever ]}</code> in <code>postInstall</code>


[[Category:Languages]]
[[Category:Languages]]