[Nix-dev] Flattening pkgs tree in nixpkgs/pkgs

Profpatsch mail at profpatsch.de
Sun Jan 10 02:20:42 CET 2016


On 16-01-09 10:56am, Jonathan Glines wrote:
> 2016/01/09 午前10:36 "Profpatsch" <mail at profpatsch.de>:
> >
> > On 16-01-08 08:53am, Daniel Peebles wrote:
> > >  and that
> > > all-packages.nix should be abolished (use builtins.readDir by default
> and a
> > > manual overrides file where necessary)
> >
> > Strong -1 on this one.
> >
> > #1: Explicit is better than implicit
> >
> > Things will get very ugly.
> 
> On the other hand, don't repeat yourself is an important principle; the
> current all-packages.nix is already pretty ugly. Any build problems would
> be handled by a (much shorter) override or blacklist.

I must disagree very strongly.
The function and its invocation are two completely different things
that should not be confused.

In this case the invocations in all-packages.nix serve two important roles:
1) They create an identifier for the package/packageset
2) They specify which dependencies the package use
The function itself does not encode any of that information.

Also, callPackages already relieves the packager from most of the work.
In fact, one might even argue that callPackages might be too implicit.

-- 
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.


More information about the nix-dev mailing list