[Nix-dev] Re: How to install an Emacs package?

Ludovic Courtès ludo at gnu.org
Mon Jul 13 13:57:42 CEST 2009


Hi Peter,

Peter Simons <simons at cryp.to> writes:

> after the recent introduction of the group "emacsPackages" I can no
> longer install any of those expressions:
>
>   $ nix-env -i magit 
>   error: selector `magit' matches no derivations
>
>   $ nix-env -i maude-mode
>   error: selector `maude-mode' matches no derivations
>
> Does anyone know why that is and, more importantly, how to fix it?

I just fixed it in r16337, by adding a call to `recurseIntoAttrs', so
that `nix-env' descends into the attributes of `emacs2[23]Packages'.

This means that now you even have 2 answers for each Emacs package!
>From a UI viewpoint, it might make sense to filter out duplicate package
names, since it isn't very helpful.

Another issue is that "nix-env -i magit" will install whichever comes
first of the Emacs 22 and 23 variants of the package.  It would be great
if it could make a decision based on the Emacs version installed in the
user profile.  Maybe this could be achieved by having the
user-environment builder call a user-defined function every time it has
to choose among several instances of a given package name.  Eelco?

Thanks,
Ludo'.




More information about the nix-dev mailing list