From bb80d77d8424cf07ba1ca293c81a081017db285b Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Mon, 19 Dec 2016 22:14:47 +0100 Subject: neovim: green :CheckHealth --- pkgs/applications/editors/neovim/default.nix | 24 +++++++++++++++------- .../editors/neovim/ruby_provider/Gemfile | 3 +++ .../editors/neovim/ruby_provider/Gemfile.lock | 15 ++++++++++++++ .../editors/neovim/ruby_provider/gemset.nix | 19 +++++++++++++++++ 4 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 pkgs/applications/editors/neovim/ruby_provider/Gemfile create mode 100644 pkgs/applications/editors/neovim/ruby_provider/Gemfile.lock create mode 100644 pkgs/applications/editors/neovim/ruby_provider/gemset.nix (limited to 'pkgs/applications/editors') 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 -- cgit 1.4.1