Perl: Difference between revisions
m prefix shell commands with "$" and use syntax highlighting |
Starfish2228 (talk | contribs) →Adding something from CPAN to nixpkgs: Clean up examples |
||
| Line 54: | Line 54: | ||
==Adding something from CPAN to nixpkgs== | ==Adding something from CPAN to nixpkgs== | ||
# Enter a <tt>nix-shell</tt> that provides the necessary dependencies: < | # Enter a <tt>nix-shell</tt> that provides the necessary dependencies: <syntaxhighlight lang="console">$ nix-shell -p nix-generate-from-cpan</syntaxhighlight> | ||
# Use the <tt>nix-generate-from-cpan.pl</tt> script (see <tt>nixpkgs/maintainers/scripts/</tt>) to generate something appropriate.<br/>Example usage: < | # Use the <tt>nix-generate-from-cpan.pl</tt> script (see <tt>nixpkgs/maintainers/scripts/</tt>) to generate something appropriate.<br/>Example usage: <syntaxhighlight lang="console">$ nix-generate-from-cpan Devel::REPL</syntaxhighlight> | ||
# 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> | # 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>. | ||
# Build and test. | # Build and test. | ||