[Nix-dev] Re: I'm stuck again.. How is the nix way to do this? nix-env -i superfluous?

Andres Loeh andres at cs.uu.nl
Wed Aug 15 13:20:32 CEST 2007


> > I'd see it more as generalizing nix-env -i. At the moment, you can
> > fully instantiated nix expressions (i.e., non-functions) to your
> > environment. Ideally, there'd be an UI where you can add functions
> > still lacking arguments, and get some guided help what to fill in for
> > the arguments. Phantasy syntax:
> > nix-env -i ghc --with-libs="gtk2hs quickcheck"
> > nix-env -i ghostview --with-x11
> > Correspondingly, nix-env -q could provide output over the available
> > flags per expression. The program nix-env would then translate all the
> > commands into a per-user expression, what maybe it already does.
> 
>  Note that you can already install arbitrary nix expressions into your 
>  environment. I guess that the following should work
> 
>  $ nix-env -i -E 'f: f.ghostview {x11Support = true; x11 = f.x11 }'
> 
>  See also the manual for nix-env. Of course, the syntax could use less space 
>  but I think that's as best as we can get.

I'm aware of that, and I should have mentioned it. But I think that
the UI side of things has to be improved. Sooner or later, we need
a way to attach descriptions to missing arguments, to query the "type"
of a missing argument, and for stuff like ghc library packages, have
a list of possible choices that are supposed to work. Furthermore, I
personally have no problems with being asked to write an anonymous
function parameterized by the default packages collection, but the
average user might not be too happy about such an instruction.

Cheers,
  Andres



More information about the nix-dev mailing list