[Nix-dev] Re: Boost libraries

Isaac Dupree ml at isaac.cedarswampstudios.org
Thu Apr 9 19:18:35 CEST 2009


Lluís Batlle wrote:
> Maybe there could be in pkgs:
>
> boost = if getConfig ["boost" "full"] true then boostFull else boostSmall;

Such an imperative way to deal with configuration!

If package configurations options were sufficiently declarative so that one could 
enumerate all of them, there could be constraint-solvers to determine a good 
solution given 1) desired packages/versions and possibly 2) what's already 
installed.  For example Haskell Cabal is working on constraint solving to 
choose what dependencies to install, although it's a difficult problem!  Even 
Debian apt-get has to make compromises sometimes.  But I think it's relatively 
non-critical for Nix because duplicate packages mostly just waste 
space/time/memory rather than being incorrect.  So there could even be 
different solver configurations, maybe optimizing for things like disk usage, 
compilation time, package provenness/stability, etc. (priorities could vary).

Does that make sense?  Of course actually having a good constraint solver is a 
lot of work.  But what would Nix expressions have to look like, in order to 
even make this be a possible thing?

-Isaac




More information about the nix-dev mailing list