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.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/applications/editors/neovim/default.nix b/pkgs/applications/editors/neovim/default.nix
index c55d4b0e76a..344293d3367 100644
--- a/pkgs/applications/editors/neovim/default.nix
+++ b/pkgs/applications/editors/neovim/default.nix
@@ -6,6 +6,7 @@
 , withPython3 ? true, python3Packages, extraPython3Packages ? []
 , withJemalloc ? true, jemalloc
 
+, withPyGUI ? false
 , vimAlias ? false
 , configure ? null
 }:
@@ -14,7 +15,7 @@ with stdenv.lib;
 
 let
 
-  version = "2015-06-09";
+  version = "0.1.0";
 
   # Note: this is NOT the libvterm already in nixpkgs, but some NIH silliness:
   neovimLibvterm = let version = "2015-02-23"; in stdenv.mkDerivation {
@@ -45,7 +46,11 @@ let
   };
 
   pythonEnv = pythonPackages.python.buildEnv.override {
-    extraLibs = [ pythonPackages.neovim ] ++ extraPythonPackages;
+    extraLibs = (
+        if withPyGUI
+          then [ pythonPackages.neovim_gui ]
+          else [ pythonPackages.neovim ]
+      ) ++ extraPythonPackages;
     ignoreCollisions = true;
   };
 
@@ -58,8 +63,8 @@ let
     name = "neovim-${version}";
 
     src = fetchFromGitHub {
-      sha256 = "1lycql0lwi7ynrsaln4kxybwvxb9fvganiq3ba4pnpcfgl155k1j";
-      rev = "6270d431aaeed71e7a8782411f36409ab8e0ee35";
+      sha256 = "1704f3dqf5p6hicpzf0pi21n6ymylra9prsm4azvqp86allmvnfx";
+      rev = "v${version}";
       repo = "neovim";
       owner = "neovim";
     };
@@ -93,6 +98,7 @@ let
 
     preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
       export DYLD_LIBRARY_PATH=${jemalloc}/lib
+      substituteInPlace src/nvim/CMakeLists.txt --replace "    util" ""
     '';
 
     postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
@@ -102,8 +108,11 @@ let
                 $out/bin/nvim
     '' + optionalString withPython ''
       ln -s ${pythonEnv}/bin/python $out/bin/nvim-python
+    '' + optionalString withPyGUI ''
+      makeWrapper "${pythonEnv}/bin/pynvim" "$out/bin/pynvim" \
+        --prefix PATH : "$out/bin"
     '' + optionalString withPython3 ''
-      ln -s ${python3Env}/bin/python $out/bin/nvim-python3
+      ln -s ${python3Env}/bin/python3 $out/bin/nvim-python3
     '' + optionalString (withPython || withPython3) ''
         wrapProgram $out/bin/nvim --add-flags "${
           (optionalString withPython