From 755670f5e4d5356e4a3d4864cb3173890d1b0dae Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Dec 2020 12:19:14 +0000 Subject: [PATCH] emacs: fix siteVersionDir path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit siteVersionDir isn't a full path, it's just the name of the version directory entry in $out/share/emacs, e.g. "27.1", so since d1b0eef9b51 ("emacs: Don't use interpolation for version"), we've been trying to remove a non-existent directory. This would have been caught if we hadn't been giving -f to rm unnecessarily, because -f suppresses errors. As well as fixing the path, I've removed the -f from rm. Doing this to the line above as well revealed that rm-ing $out/var was no longer necessary, since nothing has been put there since ac23a7c459d8 ("emacs: 25.3 → 26.1") -- it would now only be created if we set the --with-gameuser configure option, which we don't. --- pkgs/applications/editors/emacs/generic.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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