diff --git a/doc/language-support.xml b/doc/language-support.xml
index f5e7e74c123..4e6dc98f8ca 100644
--- a/doc/language-support.xml
+++ b/doc/language-support.xml
@@ -20,9 +20,15 @@ a generic package builder function for any Perl package that has a
standard Makefile.PL. It’s implemented in pkgs/development/perl-modules/generic.
-Most Perl packages from CPAN are so straight-forward to build
-that they are defined in pkgs/all-packages.nix
-itself. Here is an example:
+Perl packages from CPAN are defined in pkgs/perl-packages.nix,
+rather than pkgs/all-packages.nix. Most Perl
+packages are so straight-forward to build that they are defined here
+directly, rather than having a separate function for each package
+called from perl-packages.nix. However, more
+complicated packages should be put in a separate file, typically in
+pkgs/development/perl-modules. Here is an
+example of the former:
perlClassC3 = buildPerlPackage rec {
@@ -37,10 +43,23 @@ perlClassC3 = buildPerlPackage rec {
Note the use of mirror://cpan/, and the
${name} in the URL definition to ensure that the
name attribute is consistent with the source that we’re actually
-downloading. As usual, you can test this package as follows:
+downloading. Perl packages are made available in
+all-packages.nix through the variable
+perlPackages. For instance, if you have a package
+that needs perlClassC3, you would typically write
+
+
+foo = import ../path/to/foo.nix {
+ inherit stdenv fetchurl ...;
+ inherit (perlPackages) perlClassC3;
+};
+
+
+in all-packages.nix. You can test building a
+Perl package as follows:
-$ nix-build -A perlClassC3
+$ nix-build -A perlPackages.perlClassC3
buildPerlPackage adds perl- to
@@ -53,7 +72,7 @@ $ nix-env -i perl-Class-C3
(Of course you can also install using the attribute name:
-nix-env -i -A perlClassC3.)
+nix-env -i -A perlPackages.perlClassC3.)So what does buildPerlPackage do? It does
the following: