about summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorMichael Fellinger <m.fellinger@gmail.com>2016-12-19 22:14:47 +0100
committerRok Garbas <rok@garbas.si>2016-12-19 23:05:31 +0100
commitbb80d77d8424cf07ba1ca293c81a081017db285b (patch)
treee3d479840242d993471ecc1e214139583e494c23 /pkgs/applications/editors
parent7199f1bd9470f6acabcfadddef50d4934727796e (diff)
downloadnixlib-bb80d77d8424cf07ba1ca293c81a081017db285b.tar
nixlib-bb80d77d8424cf07ba1ca293c81a081017db285b.tar.gz
nixlib-bb80d77d8424cf07ba1ca293c81a081017db285b.tar.bz2
nixlib-bb80d77d8424cf07ba1ca293c81a081017db285b.tar.lz
nixlib-bb80d77d8424cf07ba1ca293c81a081017db285b.tar.xz
nixlib-bb80d77d8424cf07ba1ca293c81a081017db285b.tar.zst
nixlib-bb80d77d8424cf07ba1ca293c81a081017db285b.zip
neovim: green :CheckHealth
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/neovim/default.nix24
-rw-r--r--pkgs/applications/editors/neovim/ruby_provider/Gemfile3
-rw-r--r--pkgs/applications/editors/neovim/ruby_provider/Gemfile.lock15
-rw-r--r--pkgs/applications/editors/neovim/ruby_provider/gemset.nix19
4 files changed, 54 insertions, 7 deletions
diff --git a/pkgs/applications/editors/neovim/default.nix b/pkgs/applications/editors/neovim/default.nix
index e76683aa1807..354aaf6db546 100644
--- a/pkgs/applications/editors/neovim/default.nix
+++ b/pkgs/applications/editors/neovim/default.nix
@@ -5,6 +5,7 @@
 , withPython ? true, pythonPackages, extraPythonPackages ? []
 , withPython3 ? true, python3Packages, extraPython3Packages ? []
 , withJemalloc ? true, jemalloc
+, withRuby ? true, bundlerEnv
 
 , withPyGUI ? false
 , vimAlias ? false
@@ -44,6 +45,14 @@ let
     };
   };
 
+  rubyEnv = bundlerEnv {
+    name = "neovim-ruby-env";
+    gemdir = ./ruby_provider;
+  };
+
+  rubyWrapper = ''--suffix PATH : \"${rubyEnv}/bin\" '' +
+                ''--suffix GEM_HOME : \"${rubyEnv}/${rubyEnv.ruby.gemPath}\" '';
+
   pythonEnv = pythonPackages.python.buildEnv.override {
     extraLibs = (
         if withPyGUI
@@ -52,11 +61,17 @@ let
       ) ++ extraPythonPackages;
     ignoreCollisions = true;
   };
+  pythonWrapper = ''--cmd \"let g:python_host_prog='$out/bin/nvim-python'\" '';
 
   python3Env = python3Packages.python.buildEnv.override {
     extraLibs = [ python3Packages.neovim ] ++ extraPython3Packages;
     ignoreCollisions = true;
   };
+  python3Wrapper = ''--cmd \"let g:python3_host_prog='$out/bin/nvim-python3'\" '';
+  pythonFlags = optionalString (withPython || withPython3) ''--add-flags "${
+    (optionalString withPython pythonWrapper) +
+    (optionalString withPython3 python3Wrapper)
+  }"'';
 
   neovim = stdenv.mkDerivation rec {
     name = "neovim-${version}";
@@ -124,13 +139,8 @@ let
         --prefix PATH : "$out/bin"
     '' + optionalString withPython3 ''
       ln -s ${python3Env}/bin/python3 $out/bin/nvim-python3
-    '' + optionalString (withPython || withPython3) ''
-        wrapProgram $out/bin/nvim --add-flags "${
-          (optionalString withPython
-            ''--cmd \"let g:python_host_prog='$out/bin/nvim-python'\" '') +
-          (optionalString withPython3
-            ''--cmd \"let g:python3_host_prog='$out/bin/nvim-python3'\" '')
-        }"
+    '' + optionalString (withPython || withPython3 || withRuby) ''
+      wrapProgram $out/bin/nvim ${rubyWrapper + pythonFlags}
     '';
 
     meta = {
diff --git a/pkgs/applications/editors/neovim/ruby_provider/Gemfile b/pkgs/applications/editors/neovim/ruby_provider/Gemfile
new file mode 100644
index 000000000000..eebecf2906fb
--- /dev/null
+++ b/pkgs/applications/editors/neovim/ruby_provider/Gemfile
@@ -0,0 +1,3 @@
+source 'https://rubygems.org'
+
+gem 'neovim'
diff --git a/pkgs/applications/editors/neovim/ruby_provider/Gemfile.lock b/pkgs/applications/editors/neovim/ruby_provider/Gemfile.lock
new file mode 100644
index 000000000000..88100b2e8f87
--- /dev/null
+++ b/pkgs/applications/editors/neovim/ruby_provider/Gemfile.lock
@@ -0,0 +1,15 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    msgpack (1.0.2)
+    neovim (0.3.1)
+      msgpack (~> 1.0)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  neovim
+
+BUNDLED WITH
+   1.12.5
diff --git a/pkgs/applications/editors/neovim/ruby_provider/gemset.nix b/pkgs/applications/editors/neovim/ruby_provider/gemset.nix
new file mode 100644
index 000000000000..c3ed45a78481
--- /dev/null
+++ b/pkgs/applications/editors/neovim/ruby_provider/gemset.nix
@@ -0,0 +1,19 @@
+{
+  msgpack = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1fb2my91j08plsbbry5kilsrh7slmzgbbf6f55zy6xk28p9036lg";
+      type = "gem";
+    };
+    version = "1.0.2";
+  };
+  neovim = {
+    dependencies = ["msgpack"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "018mk4vqaxzbk4anq558h2rgj8prbn2rmi777iwrg3n0v8k5nxqw";
+      type = "gem";
+    };
+    version = "0.3.1";
+  };
+}
\ No newline at end of file