Perl: Difference between revisions

DHCP (talk | contribs)
m prefix shell commands with "$" and use syntax highlighting
 
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: <syntaxHighlight lang=console>$ nix-shell -p perl perlPackages.CPANPLUS perlPackages.GetoptLongDescriptive perlPackages.LogLog4perl perlPackages.Readonly</syntaxHighlight>
# 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: <syntaxHighlight lang=console>$ nix-generate-from-cpan.pl Devel::REPL</syntaxHighlight>
# 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> &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>.
# Build and test.
# Build and test.