diff options
author | Nicolas Dudebout <nicolas.dudebout@gmail.com> | 2016-09-27 15:57:52 -0400 |
---|---|---|
committer | Nicolas Dudebout <nicolas.dudebout@gmail.com> | 2016-09-27 15:57:52 -0400 |
commit | 7e7d588ca936bca8c535f697d43b1c3b23b7e468 (patch) | |
tree | 2c4ce47ba8329e8fc8ee6162963ffc0379c40d18 /pkgs/applications/editors/emacs/site-start.el | |
parent | bb6708b8586e5ecc2ec2a70b19c342843651c5d2 (diff) | |
download | nixpkgs-7e7d588ca936bca8c535f697d43b1c3b23b7e468.tar nixpkgs-7e7d588ca936bca8c535f697d43b1c3b23b7e468.tar.gz nixpkgs-7e7d588ca936bca8c535f697d43b1c3b23b7e468.tar.bz2 nixpkgs-7e7d588ca936bca8c535f697d43b1c3b23b7e468.tar.lz nixpkgs-7e7d588ca936bca8c535f697d43b1c3b23b7e468.tar.xz nixpkgs-7e7d588ca936bca8c535f697d43b1c3b23b7e468.tar.zst nixpkgs-7e7d588ca936bca8c535f697d43b1c3b23b7e468.zip |
emacs: install the C source from postInstall
Reimplement the C source installation from the derivation instead of relying on a Makefile patch.
Diffstat (limited to 'pkgs/applications/editors/emacs/site-start.el')
-rw-r--r-- | pkgs/applications/editors/emacs/site-start.el | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/pkgs/applications/editors/emacs/site-start.el b/pkgs/applications/editors/emacs/site-start.el index 023d6412ed8..b41ca92db08 100644 --- a/pkgs/applications/editors/emacs/site-start.el +++ b/pkgs/applications/editors/emacs/site-start.el @@ -1,4 +1,4 @@ -;; NixOS specific load-path +;;; NixOS specific load-path (setq load-path (append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/")) (split-string (or (getenv "NIX_PROFILES") "")))) @@ -11,7 +11,25 @@ (split-string (or (getenv "NIX_PROFILES") "")))) woman-manpath))) -;; Make tramp work for remote NixOS machines -;;; NOTE: You might want to add +;;; Make tramp work for remote NixOS machines (eval-after-load 'tramp '(add-to-list 'tramp-remote-path "/run/current-system/sw/bin")) + +;;; C source directory +;;; +;;; Computes the location of the C source directory from the path of +;;; the current file: +;;; from: /nix/store/<hash>-emacs-<version>/share/emacs/site-lisp/site-start.el +;;; to: /nix/store/<hash>-emacs-<version>/share/emacs/<version>/src/ +(let ((emacs + (file-name-directory ;; .../emacs/ + (directory-file-name ;; .../emacs/site-lisp + (file-name-directory load-file-name)))) ;; .../emacs/site-lisp/ + (version + (file-name-as-directory + (concat + (number-to-string emacs-major-version) + "." + (number-to-string emacs-minor-version)))) + (src (file-name-as-directory "src"))) + (setq find-function-C-source-directory (concat emacs version src))) |