git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #49884 from kalbasit/nixpkgs_neovim-build-with-nodejs

neovim wrapper: build with nodejs support

commit1ed494367ae5baa649234cd9a725cb8f534a92f3 authorJörg Thalheim <Mic92@users.noreply.github.com> dateThu 15 Nov 2018, 09:55 (8 years ago) parent06061b7da4a004
3 files changed+60−1
pkgs/applications/editors/neovim/wrapper.nix+8−1 pkgs/development/node-packages/node-packages-v8.json+1 pkgs/development/node-packages/node-packages-v8.nix+51
pkgs/applications/editors/neovim/wrapper.nix+8−1
@@ -1,6 +1,8 @@
11{ stdenv, lib, makeWrapper
22, vimUtils
33, bundlerEnv, ruby
4+, nodejs
5+, nodePackages
46, pythonPackages
57, python3Packages
68}:
@@ -12,6 +14,7 @@ let
1214 wrapper = {
1315 withPython ? true, extraPythonPackages ? (_: []) /* the function you would have passed to python.withPackages */
1416 , withPython3 ? true, extraPython3Packages ? (_: []) /* the function you would have passed to python.withPackages */
17+ , withNodeJs? false
1518 , withRuby ? true
1619 , withPyGUI ? false
1720 , vimAlias ? false
@@ -50,6 +53,8 @@ let
5053 ++ (extraPython3PackagesFun ps)
5154 ++ (concatMap (f: f ps) pluginPython3Packages));
5255
56+ binPath = makeBinPath (optionals withRuby [rubyEnv] ++ optionals withNodeJs [nodejs]);
57+
5358 in
5459 stdenv.mkDerivation {
5560 name = "neovim-${stdenv.lib.getVersion neovim}";
@@ -62,10 +67,12 @@ let
6267
6368 makeWrapper "$(readlink -v --canonicalize-existing "${bin}")" \
6469 "$out/bin/nvim" --add-flags " \
70+ --cmd \"${if withNodeJs then "let g:node_host_prog='${nodePackages.neovim}/bin/neovim-node-host'" else "let g:loaded_node_provider=1"}\" \
6571 --cmd \"${if withPython then "let g:python_host_prog='$out/bin/nvim-python'" else "let g:loaded_python_provider = 1"}\" \
6672 --cmd \"${if withPython3 then "let g:python3_host_prog='$out/bin/nvim-python3'" else "let g:loaded_python3_provider = 1"}\" \
6773 --cmd \"${if withRuby then "let g:ruby_host_prog='$out/bin/nvim-ruby'" else "let g:loaded_ruby_provider=1"}\" " \
68− ${optionalString withRuby '' --suffix PATH : ${rubyEnv}/bin --set GEM_HOME ${rubyEnv}/${rubyEnv.ruby.gemPath}'' }
74+ --suffix PATH : ${binPath} \
75+ ${optionalString withRuby '' --set GEM_HOME ${rubyEnv}/${rubyEnv.ruby.gemPath}'' }
6976
7077 ''
7178 + optionalString (!stdenv.isDarwin) ''
pkgs/development/node-packages/node-packages-v8.json+1
@@ -69,6 +69,7 @@
6969, "meguca"
7070, "mocha"
7171, "multi-file-swagger"
72+, "neovim"
7273, "nijs"
7374, "node2nix"
7475, "node-gyp"
pkgs/development/node-packages/node-packages-v8.nix+51
@@ -12309,6 +12309,15 @@ let
1230912309 sha1 = "df8c69eef1647923c7157b9ce83840610b02cc39";
1231012310 };
1231112311 };
12312+ "event-lite-0.1.2" = {
12313+ name = "event-lite";
12314+ packageName = "event-lite";
12315+ version = "0.1.2";
12316+ src = fetchurl {
12317+ url = "https://registry.npmjs.org/event-lite/-/event-lite-0.1.2.tgz";
12318+ sha512 = "HnSYx1BsJ87/p6swwzv+2v6B4X+uxUteoDfRxsAb1S1BePzQqOLevVmkdA15GHJVd9A9Ok6wygUR18Hu0YeV9g==";
12319+ };
12320+ };
1231212321 "event-pubsub-4.3.0" = {
1231312322 name = "event-pubsub";
1231412323 packageName = "event-pubsub";
@@ -22698,6 +22707,15 @@ let
2269822707 sha1 = "923e2c5cffa65c8418e9b228d1124793969c429c";
2269922708 };
2270022709 };
22710+ "msgpack-lite-0.1.26" = {
22711+ name = "msgpack-lite";
22712+ packageName = "msgpack-lite";
22713+ version = "0.1.26";
22714+ src = fetchurl {
22715+ url = "https://registry.npmjs.org/msgpack-lite/-/msgpack-lite-0.1.26.tgz";
22716+ sha1 = "dd3c50b26f059f25e7edee3644418358e2a9ad89";
22717+ };
22718+ };
2270122719 "msgpack5-3.6.0" = {
2270222720 name = "msgpack5";
2270322721 packageName = "msgpack5";
@@ -50876,6 +50894,39 @@ in
5087650894 production = true;
5087750895 bypassCache = true;
5087850896 };
50897+ neovim = nodeEnv.buildNodePackage {
50898+ name = "neovim";
50899+ packageName = "neovim";
50900+ version = "4.2.1";
50901+ src = fetchurl {
50902+ url = "https://registry.npmjs.org/neovim/-/neovim-4.2.1.tgz";
50903+ sha512 = "2Kto3HlBsFFtgyAmV8ecNtBBUrydoXp2EfIHwIvuhOIiVinCuKJaUmp1+1u5eGGu1TDZHUiHwvFv0T05eG8T+w==";
50904+ };
50905+ dependencies = [
50906+ sources."async-1.0.0"
50907+ sources."colors-1.0.3"
50908+ sources."cycle-1.0.3"
50909+ sources."event-lite-0.1.2"
50910+ sources."eyes-0.1.8"
50911+ sources."ieee754-1.1.12"
50912+ sources."int64-buffer-0.1.10"
50913+ sources."isarray-1.0.0"
50914+ sources."isstream-0.1.2"
50915+ sources."lodash-4.17.11"
50916+ sources."msgpack-lite-0.1.26"
50917+ sources."stack-trace-0.0.10"
50918+ sources."traverse-0.6.6"
50919+ sources."winston-2.4.4"
50920+ ];
50921+ buildInputs = globalBuildInputs;
50922+ meta = {
50923+ description = "Neovim client API and neovim remote plugin provider";
50924+ homepage = https://github.com/neovim/node-client;
50925+ license = "MIT";
50926+ };
50927+ production = true;
50928+ bypassCache = true;
50929+ };
5087950930 nijs = nodeEnv.buildNodePackage {
5088050931 name = "nijs";
5088150932 packageName = "nijs";