about summary refs log tree commit diff
path: root/pkgs/applications/editors/vim/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/vim/default.nix')
-rw-r--r--pkgs/applications/editors/vim/default.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix
index d8167f6098791..42a1b730fe15f 100644
--- a/pkgs/applications/editors/vim/default.nix
+++ b/pkgs/applications/editors/vim/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, callPackage, ncurses, gettext, pkg-config
+{ lib, stdenv, fetchurl, callPackage, ncurses, bash, gawk, gettext, pkg-config
 # default vimrc
 , vimrc ? fetchurl {
     name = "default-vimrc";
@@ -18,9 +18,11 @@ stdenv.mkDerivation {
   inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta;
 
   nativeBuildInputs = [ gettext pkg-config ];
-  buildInputs = [ ncurses ]
+  buildInputs = [ ncurses bash gawk ]
     ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ];
 
+  strictDeps = true;
+
   configureFlags = [
     "--enable-multibyte"
     "--enable-nls"
@@ -36,6 +38,13 @@ stdenv.mkDerivation {
     "vim_cv_memmove_handles_overlap=yes"
   ];
 
+  # which.sh is used to for vim's own shebang patching, so make it find
+  # binaries for the host platform.
+  preConfigure = ''
+    export HOST_PATH
+    substituteInPlace src/which.sh --replace '$PATH' '$HOST_PATH'
+  '';
+
   postInstall = ''
     ln -s $out/bin/vim $out/bin/vi
     mkdir -p $out/share/vim