[Nix-dev] Re: Boost libraries

Isaac Dupree ml at isaac.cedarswampstudios.org
Tue Apr 14 03:35:53 CEST 2009


Nicolas Pierron wrote:
>  - Cannot reproduce an installation without installing the same set of
> packages. (or activating each option manually)

Won't this always be a problem?  There is a good deal of complexity defining 
each installation:
- The Nix expression(s) and all expressions it depends on (these can get out-
of-date and older versions removed from official repositories).
- including all arguments that the expression was called with.

I imagine a constraint-solver would be something outside Nix that gives you 
these lists/configurations of packages in a text format that you could save.

>  - Need to handle constraint programming in Nix. (or new extra
> dependencies for Nix)

I wonder...
{stdenv, subversion, ...}:
stdenv.mkDerivation {
  constraints = [ [ ">=" subversion 1.3 ] [ "with" subversion "perl" ] ]
  ...
}

Then, somehow, a way for constraints to be extracted / checked / computed 
with.  The point is to make it somehow sufficiently declarative ... so the above 
approach might not work, the info. might have to appear outside the lambda 
"{stdenv, subversion, ...}:" (in functional terms anyway -- but you guys seem 
quite willing to hack around the "normal" opaque way that I'm used to Haskell 
functions behaving)

Of course the constraints expressed in the repo will never quite be accurate, 
because there are so many different ways package-versions can be combined that 
might or might not *actually* work quite right... but it's an attempt, maybe 
one that's worth making?

-Isaac




More information about the nix-dev mailing list