about summary refs log tree commit diff
path: root/pkgs/applications/editors/neovim/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/neovim/default.nix')
-rw-r--r--pkgs/applications/editors/neovim/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/applications/editors/neovim/default.nix b/pkgs/applications/editors/neovim/default.nix
index 27e274326470..d7932dc4dcfc 100644
--- a/pkgs/applications/editors/neovim/default.nix
+++ b/pkgs/applications/editors/neovim/default.nix
@@ -53,6 +53,13 @@ let
 
     lualibs = [ luaPackages.mpack luaPackages.lpeg luaPackages.luabitop ];
 
+    # nvim --version output retains compilation flags and references to build tools
+    postPatch = ''
+      substituteInPlace src/nvim/version.c --replace NVIM_VERSION_CFLAGS "";
+    '';
+    # check that the above patching actually works
+    disallowedReferences = [ stdenv.cc ];
+
     cmakeFlags = [
       "-DLUA_PRG=${luaPackages.lua}/bin/lua"
       "-DGPERF_PRG=${gperf}/bin/gperf"