about summary refs log tree commit diff
path: root/pkgs/misc/vim-plugins
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2017-03-18 18:24:19 +0100
committerGitHub <noreply@github.com>2017-03-18 18:24:19 +0100
commit846b6d250ab0e6431b469dc203cc5feaf3fc3720 (patch)
treedbfd08e77c82e104574fbdf3ec0f15b568db3d86 /pkgs/misc/vim-plugins
parent3a919cf7dabeb3763d8c947baff5b8ddfd316676 (diff)
parent4b9ec73288288a693576795494705f42a626fadd (diff)
downloadnixlib-846b6d250ab0e6431b469dc203cc5feaf3fc3720.tar
nixlib-846b6d250ab0e6431b469dc203cc5feaf3fc3720.tar.gz
nixlib-846b6d250ab0e6431b469dc203cc5feaf3fc3720.tar.bz2
nixlib-846b6d250ab0e6431b469dc203cc5feaf3fc3720.tar.lz
nixlib-846b6d250ab0e6431b469dc203cc5feaf3fc3720.tar.xz
nixlib-846b6d250ab0e6431b469dc203cc5feaf3fc3720.tar.zst
nixlib-846b6d250ab0e6431b469dc203cc5feaf3fc3720.zip
Merge pull request #23256 from edanaher/ensime
Ensime
Diffstat (limited to 'pkgs/misc/vim-plugins')
-rw-r--r--pkgs/misc/vim-plugins/default.nix35
-rw-r--r--pkgs/misc/vim-plugins/vim-plugin-names1
-rw-r--r--pkgs/misc/vim-plugins/vim-utils.nix23
3 files changed, 53 insertions, 6 deletions
diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix
index 2686138bc930..a0d04638504c 100644
--- a/pkgs/misc/vim-plugins/default.nix
+++ b/pkgs/misc/vim-plugins/default.nix
@@ -4,6 +4,7 @@
 , xkb_switch, rustracerd, fzf
 , python3, boost, icu
 , ycmd
+, pythonPackages, python3Packages
 , Cocoa ? null
 }:
 
@@ -344,6 +345,18 @@ rec {
 
   };
 
+  ensime-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation
+    name = "ensime-vim-2017-02-06";
+    src = fetchgit {
+      url = "git://github.com/ensime/ensime-vim";
+      rev = "7b5f79c67a078c6e1e5f8c906d4227ce86d33df8";
+      sha256 = "04knizaa4gc1z22gxj41qybjl4ysqpv15rwi28h10l7gk9fb1b41";
+    };
+    dependencies = ["vimproc" "vimshell" "self" "forms"];
+
+    pythonDependencies = with pythonPackages; [ sexpdata websocket_client ];
+  };
+
   extradite = buildVimPluginFrom2Nix { # created by nix#NixDerivation
     name = "extradite-2015-09-22";
     src = fetchgit {
@@ -355,6 +368,17 @@ rec {
 
   };
 
+  forms = buildVimPluginFrom2Nix { # created by nix#NixDerivation
+    name = "forms-2012-11-28";
+    src = fetchgit {
+      url = "git://github.com/megaannum/forms";
+      rev = "b601e03fe0a3b8a43766231f4a6217e4492b4f75";
+      sha256 = "19kp1i5c6jmnpbsap9giayqbzlv7vh02mp4mjvicqj9n0nfyay74";
+    };
+    dependencies = ["self"];
+
+  };
+
   fugitive = buildVimPluginFrom2Nix { # created by nix#NixDerivation
     name = "fugitive-2017-02-25";
     src = fetchgit {
@@ -1154,6 +1178,17 @@ rec {
     '';
   };
 
+  self = buildVimPluginFrom2Nix { # created by nix#NixDerivation
+    name = "self-2014-05-28";
+    src = fetchgit {
+      url = "git://github.com/megaannum/self";
+      rev = "2ed666b547eddee6ae1fcc63babca4ba0b66a59f";
+      sha256 = "1gcwn6i5i3msg7hrlzsnv1bs6pm4jz9cff8ppaz2xdj8xv9qy6fn";
+    };
+    dependencies = [];
+
+  };
+
   shabadou-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation
     name = "shabadou-vim-2016-07-19";
     src = fetchgit {
diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names
index f5f3f9556577..1427f4fafa08 100644
--- a/pkgs/misc/vim-plugins/vim-plugin-names
+++ b/pkgs/misc/vim-plugins/vim-plugin-names
@@ -47,6 +47,7 @@
 "github:elmcast/elm-vim"
 "github:embear/vim-localvimrc"
 "github:enomsg/vim-haskellConcealPlus"
+"github:ensime/ensime-vim"
 "github:esneider/YUNOcommit.vim"
 "github:fatih/vim-go"
 "github:flazz/vim-colorschemes"
diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix
index 141dde927626..22098b68a558 100644
--- a/pkgs/misc/vim-plugins/vim-utils.nix
+++ b/pkgs/misc/vim-plugins/vim-utils.nix
@@ -150,6 +150,10 @@ vim_with_plugins can be installed like any other application within Nix.
 let
   inherit (stdenv) lib;
 
+  toNames = x:
+      if builtins.isString x then [x]
+      else (lib.optional (x ? name) x.name)
+            ++ (x.names or []);
   findDependenciesRecursively = {knownPlugins, names}:
 
     let depsOf = name: (builtins.getAttr name knownPlugins).dependencies or [];
@@ -211,11 +215,6 @@ let
       (let
         knownPlugins = vam.knownPlugins or vimPlugins;
 
-        toNames = x:
-            if builtins.isString x then [x]
-            else (lib.optional (x ? name) x.name)
-                  ++ (x.names or []);
-
         names = findDependenciesRecursively { inherit knownPlugins; names = lib.concatMap toNames vam.pluginDictionaries; };
 
         # Vim almost reads JSON, so eventually JSON support should be added to Nix
@@ -412,6 +411,19 @@ rec {
     configurePhase =":";
   } // a);
 
+  requiredPlugins = {
+    knownPlugins ? vimPlugins,
+    vam ? null,
+    pathogen ? null, ...
+  }:
+    let
+      pathogenNames = map (name: knownPlugins.${name}) (findDependenciesRecursively { inherit knownPlugins; names = pathogen.pluginNames; });
+      vamNames = findDependenciesRecursively { inherit knownPlugins; names = lib.concatMap toNames vam.pluginDictionaries; };
+      names = (lib.optionals (pathogen != null) pathogenNames) ++
+              (lib.optionals (vam != null) vamNames);
+    in
+      map (name: knownPlugins.${name}) names;
+
   # test cases:
   test_vim_with_vim_addon_nix_using_vam = vim_configurable.customize {
    name = "vim-with-vim-addon-nix-using-vam";
@@ -427,5 +439,4 @@ rec {
     name = "vim-with-vim-addon-nix";
     vimrcConfig.packages.myVimPackage.start = with vimPlugins; [ vim-addon-nix ];
   };
-
 }