set emacs load-path according to NIX_PROFILES via site-start.el

svn path=/nixpkgs/trunk/; revision=31252
This commit is contained in:
Florian Friesdorf 2012-01-03 20:58:54 +00:00
parent e43bd7c4ce
commit 195ff32a63

View file

@ -31,6 +31,16 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional (stdenv ? glibc)
[ "--with-crt-dir=${stdenv.glibc}/lib" ];
postInstall = ''
cat >$out/share/emacs/site-lisp/site-start.el <<EOF
;; nixos specific load-path
(setq load-path
(append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
(split-string (getenv "NIX_PROFILES"))))
load-path))
EOF
'';
doCheck = true;
meta = {