about summary refs log tree commit diff
path: root/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2022-12-23 12:34:32 -0500
committerfigsoda <figsoda@pm.me>2022-12-23 12:37:26 -0500
commit2579a9877a3143438c1684045035eb24f2b70979 (patch)
tree06f9acc2db841f774ee470efaa0eb544753296d5 /pkgs/applications/editors/vim/plugins/build-vim-plugin.nix
parentbb350e4a177880b588d990074be5561026483592 (diff)
vimUtils.buildVimPlugin: format
Diffstat (limited to 'pkgs/applications/editors/vim/plugins/build-vim-plugin.nix')
-rw-r--r--pkgs/applications/editors/vim/plugins/build-vim-plugin.nix79
1 files changed, 39 insertions, 40 deletions
diff --git a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix
index 42eacb29ca5e1..20641908115c2 100644
--- a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix
+++ b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix
@@ -1,9 +1,6 @@
-{ lib, stdenv
+{ lib
+, stdenv
 , rtpPath
-, vim
-, vimCommandCheckHook
-, vimGenDocHook
-, neovimRequireCheckHook
 , toVimPlugin
 }:
 
@@ -14,44 +11,46 @@ rec {
       overrideAttrs = f: addRtp (drv.overrideAttrs f);
     };
 
-  buildVimPlugin = attrs@{
-    name ? "${attrs.pname}-${attrs.version}",
-    namePrefix ? "vimplugin-",
-    src,
-    unpackPhase ? "",
-    configurePhase ? "",
-    buildPhase ? "",
-    preInstall ? "",
-    postInstall ? "",
-    path ? ".",
-    addonInfo ? null,
-    meta ? { },
-    ...
-  }:
-    let drv = stdenv.mkDerivation (attrs // {
-      name = namePrefix + name;
-
-      inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
-
-      installPhase = ''
-        runHook preInstall
-
-        target=$out/${rtpPath}/${path}
-        mkdir -p $out/${rtpPath}
-        cp -r . $target
-
-        runHook postInstall
-      '';
-
-      meta = {
-        platforms = lib.platforms.all;
-      } // meta;
-    });
-    in addRtp (toVimPlugin drv);
+  buildVimPlugin =
+    { name ? "${attrs.pname}-${attrs.version}"
+    , namePrefix ? "vimplugin-"
+    , src
+    , unpackPhase ? ""
+    , configurePhase ? ""
+    , buildPhase ? ""
+    , preInstall ? ""
+    , postInstall ? ""
+    , path ? "."
+    , addonInfo ? null
+    , meta ? { }
+    , ...
+    }@attrs:
+    let
+      drv = stdenv.mkDerivation (attrs // {
+        name = namePrefix + name;
+
+        inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
+
+        installPhase = ''
+          runHook preInstall
+
+          target=$out/${rtpPath}/${path}
+          mkdir -p $out/${rtpPath}
+          cp -r . $target
+
+          runHook postInstall
+        '';
+
+        meta = {
+          platforms = lib.platforms.all;
+        } // meta;
+      });
+    in
+    addRtp (toVimPlugin drv);
 
   buildVimPluginFrom2Nix = attrs: buildVimPlugin ({
     # vim plugins may override this
     buildPhase = ":";
-    configurePhase =":";
+    configurePhase = ":";
   } // attrs);
 }