NixOS/nixpkgs — pull request #664 by the-kenny (2013-06-22 00:04:27+00:00)
Title: Add package.el builder & packages

Nixpkgs already had some Emacs packages included. As of today, many new (and existing) packages are distributed via package.el, either on GNU ELPA or Marmalade.

This pull requests implement a new builder (```buildEmacsPackage```) for package.el packages which integrates nicely with Nix. In order to correctly set the ```package-directory-list``` variable in Emacs, it adds some code to the ```site-start.el``` file (9db63bfb059805e7ff242172b220060926bf2a9e) which checks the environment variable ```EMACS_PACKAGE_EL_PACKAGES``` for directories. This variable is set by the setup-hook of Emacs.

The other addition is a script to generate package expressions from generic package.el repositories. This enables us to automatically import all available packages from the popular repositories and distribute them with Nix. Included in this pull request is the generated file for GNU ELPA and Marmalade, which are the most popular repositories for stable releases.

The whole result also plays nicely with the existing emacs packages in Nix: They can even depend on each other.

My intention for all this was to get more familar with nix and the way packages are built, used, and integrated. Another reason was the ability to automatically test package.el packages via Hydra, which might be useful for some personal projects for me.

I don't know what you guys think about all this, and I'm happy for any feedback. Positive or negative.