[Nix-dev] Re: [Nix-commits] SVN commit: nix - 15124 - eelco - nixpkgs/trunk/doc

Nicolas Pierron nicolas.b.pierron at gmail.com
Sat Apr 18 15:22:00 CEST 2009


Hi,

On Sat, Apr 18, 2009 at 13:09, Eelco Dolstra <e.dolstra at tudelft.nl> wrote:
> +<para>Most Perl packages from CPAN are so straight-forward to build
> +that they are defined in <filename>pkgs/all-packages.nix</filename>
> +itself.  Here is an example:
> +
> +<programlisting>
> +perlClassC3 = buildPerlPackage rec {
> +  name = "Class-C3-0.21";
> +  src = fetchurl {
> +    url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
> +    sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
> +  };
> +};
> +</programlisting>

Why Perl packages are defined directly inside all-packages.nix.  I
think that all-packages.nix is modified too frequently and we should
use "recurseForDerivation = true" in such case.

As your example naming implies, we mainly want to have a prefix on top
of each perl module name, so why not creating:

perlModules = (import ../path) pkgs // { recurseForDerivation = true; };

and have a file which contains the whole list of perl Modules.  This
does not change the behaviour of "nix-env -i", so why creating
redundant prefix when we can factor it and move some part of the
content of all-packages.nix outside of it?

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron
- If you are doing something twice then you should try to do it once.



More information about the nix-dev mailing list