[Nix-dev] New proposal about expression syntax usage.

Michael Raskin 7c6f434c at mail.ru
Wed Aug 8 23:49:40 CEST 2007


	Hello.
This is somehow a follow-up to a recent discussion on #trace. Now
packages are written like this:

some = import ../some {inherit ncurses;}

--- some/default.nix

{ncurses}:
{
buildInputs = [ncurses];
}

---

Here the list of dependencies (a thing likely to change!) is repeated 3
times - two of them in supposedly small file some/default.nix .
Technically speaking, nix can check even that passed arguments are all
taken by function, but not that they are really used (and not forgot).

I think that one repeat per file is enough in most cases. So in
pkgs/servers/irc/ircd-hybrid I used proposed new form:

args:
{
buildInputs = (with args; [ncurses]);
}

I hope to get some opinions on this change, and maybe even persuade
everyone to write future expressions in new format.




More information about the nix-dev mailing list