[Nix-dev] Reorganization of the nixpkg file hierarchy

Eelco Dolstra e.dolstra at tudelft.nl
Mon Feb 9 13:56:52 CET 2009


Hi all,

John Altobelli wrote:

> For the past week I've been working on a branch of nixpkgs that moves
> the packages into an file hierarchy modeled after the Gentoo portage
> system (http://gentoo-portage.com/Browse).  I have since completed the
> reorganization and would like to get the opinions of the developers
> here about whether they like this new hierarchy and whether it would
> be worth moving into mainline.

My thoughts on this:

I don't think that a 2-level structure like Gentoo buys us anything.  In the
Gentoo scheme, names such as media-libs, dev-libs, sys-libs, etc. reveal the
limitations of a 2-level structure: it would IMHO be more appropriate to name
these libs/media, libs/dev, libs/sys and so on.

However, there are currently a number of directories in Nixpkgs that are very
large, in particular development/libraries which has >= 256 packages in it.
These should definitely be refactored, e.g. libraries/media, libraries/sys,
libraries/net etc.

Another issue is that right now there is a lot of stuff in the pkgs directory
which aren't actually packages :-)  Namely, pkgs/lib, pkgs/stdenv,
pkgs/build-support and pkgs/top-level.  I would propose moving these one level
up in the tree so that pkgs only contains Nix expressions for actual packages.

And another issue: we should have a standard policy for the naming of packages
with multiple versions.  For some packages, we have a directory per version
(e.g. development/libraries/glibc-{2.7,2.9,...} or
development/compilers/gcc-{4.2,4.3,...}).  It's cleaner to put the versions
together in one directory, like development/libraries/glibc/2.7 and
development/libraries/glibc/2.9.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list