Perl: Difference between revisions

imported>NieDzejkob
describe wrapping PERL5LIB
imported>Artturin
No edit summary
Line 16: Line 16:


To make perl modules available to a program in your derivation:
To make perl modules available to a program in your derivation:
* add <code>makeWrapper</code> to <code>buildInputs</code>
* add <code>makeWrapper</code> to <code>nativeBuildInputs</code>
* run <code>wrapProgram $pathToScript --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.Whatever ]}</code> in <code>postInstall</code>
* add <syntaxhighlight lang="nix">
postFixup = ''
  wrapProgram $out/bin/something \
    --prefix PERL5LIB : "${with perlPackages; makePerlPath [ something ]}"
'';
</syntaxhighlight>


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