summary refs log tree commit diff
path: root/pkgs/applications/editors/nvi
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-04-16 20:09:07 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-04-16 20:09:07 +0000
commitb211399689fd910f280b04bd7b98230251b33e3a (patch)
tree890ea8f42b82fd1690ed049f047c91a09b5ad108 /pkgs/applications/editors/nvi
parentdae40d9c62becd77445349ef8b74d4ff0055e5ac (diff)
Making nvi avoid /var/tmp.
svn path=/nixpkgs/trunk/; revision=15102
Diffstat (limited to 'pkgs/applications/editors/nvi')
-rw-r--r--pkgs/applications/editors/nvi/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/applications/editors/nvi/default.nix b/pkgs/applications/editors/nvi/default.nix
index d08e44699c4eb..6f33758ce4f49 100644
--- a/pkgs/applications/editors/nvi/default.nix
+++ b/pkgs/applications/editors/nvi/default.nix
@@ -10,8 +10,12 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ ncurses ];
 
+  # nvi tries to write to a usual tmp directory (/var/tmp),
+  # so we will force it to use /tmp.
   patchPhase = ''
-    sed -i s/-lcurses/-lncurses/ build/configure
+    sed -i -e s/-lcurses/-lncurses/ \
+      -e s@vi_cv_path_preserve=no@vi_cv_path_preserve=/tmp/vi.recover@ \
+      -e s@/var/tmp@@ build/configure
   '';
 
   configurePhase = ''