diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index 0e09b0c20ee0..a84cb41bf30f 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -141,8 +141,7 @@ in stdenv.mkDerivation { siteVersionDir=`ls $out/share/emacs | grep -v site-lisp | head -n 1` - rm -rf $out/var - rm -rf $siteVersionDir + rm -r $out/share/emacs/$siteVersionDir/site-lisp '' + lib.optionalString withCsrc '' for srcdir in src lisp lwlib ; do dstdir=$out/share/emacs/$siteVersionDir/$srcdir