From e4fcc9aed14abc5fd5acd38ca4d5384d993a625b Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Sun, 15 Nov 2020 10:59:19 -0500 Subject: [PATCH 1/2] emacs: properly include source code when withCsrc is true Previously, we just copied it into a separate directory in the build directory. That's not useful, and not what was intended. --- pkgs/applications/editors/emacs/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index f2904f3e012b..402a6a13cec7 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -142,7 +142,7 @@ in stdenv.mkDerivation { rm -rf $siteVersionDir '' + lib.optionalString withCsrc '' for srcdir in src lisp lwlib ; do - dstdir=$siteVersionDir/$srcdir + dstdir=$out/share/emacs/$siteVersionDir/$srcdir mkdir -p $dstdir find $srcdir -name "*.[chm]" -exec cp {} $dstdir \; cp $srcdir/TAGS $dstdir From 802fa5b9d1b166568243a514a64bb9fc78ceb60d Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Sun, 15 Nov 2020 13:32:05 -0500 Subject: [PATCH 2/2] emacs: properly calculate the path of the src directory --- pkgs/applications/editors/emacs/site-start.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/applications/editors/emacs/site-start.el b/pkgs/applications/editors/emacs/site-start.el index de4708b88908..2f02d6d1a86d 100644 --- a/pkgs/applications/editors/emacs/site-start.el +++ b/pkgs/applications/editors/emacs/site-start.el @@ -52,9 +52,6 @@ least specific (the system profile)" (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)))) + emacs-version)) (src (file-name-as-directory "src"))) (setq find-function-C-source-directory (concat emacs version src)))