Perl: Difference between revisions

From NixOS Wiki
imported>HLandau
mNo edit summary
imported>HLandau
mNo edit summary
Line 2: Line 2:


* Use the <tt>nix-generate-from-cpan.pl</tt> script (see <tt>nixpkgs/maintainers/scripts/</tt>) to generate something appropriate.<br/>Example usage: <tt>nix-generate-from-cpan.pl Devel::REPL</tt>
* Use the <tt>nix-generate-from-cpan.pl</tt> script (see <tt>nixpkgs/maintainers/scripts/</tt>) to generate something appropriate.<br/>Example usage: <tt>nix-generate-from-cpan.pl Devel::REPL</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> &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.


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

Revision as of 17:43, 24 October 2017

How to add something from CPAN to nixpkgs

  • Use the nix-generate-from-cpan.pl script (see nixpkgs/maintainers/scripts/) to generate something appropriate.
    Example usage: nix-generate-from-cpan.pl Devel::REPL
  • After reviewing the result from the previous step and making appropriate modifications, add it to pkgs/top-level/perl-packages.nix. Note that some things use buildPerlPackage while some use buildPerlModule. Also note the mostly-followed naming convention as well as the mostly-followed alphabetical ordering. There are plenty of examples in perl-packages.nix — use the source, Luke!
  • Build and test.