diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md index 9a591bd0129a..da139623a25c 100644 --- a/doc/languages-frameworks/vim.section.md +++ b/doc/languages-frameworks/vim.section.md @@ -139,9 +139,9 @@ Note: this is not possible anymore for Neovim. ## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs} -Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`nix-shell -p vimPluginsUpdater --run vim-plugins-updater`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/updater.nix). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). +Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`nix-shell -p vimPluginsUpdater --run vim-plugins-updater`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/utils/updater.nix). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). -When the vim updater detects an nvim-treesitter update, it also runs [`nvim-treesitter/update.py $(nix-build -A vimPlugins.nvim-treesitter)`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py) to update the tree sitter grammars for `nvim-treesitter`. +When the vim updater detects an nvim-treesitter update, it also runs [`nvim-treesitter/update.py $(nix-build -A vimPlugins.nvim-treesitter)`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/utils/update.py) to update the tree sitter grammars for `nvim-treesitter`. Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added: diff --git a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix b/pkgs/applications/editors/vim/plugins/utils/build-vim-plugin.nix similarity index 100% rename from pkgs/applications/editors/vim/plugins/build-vim-plugin.nix rename to pkgs/applications/editors/vim/plugins/utils/build-vim-plugin.nix diff --git a/pkgs/applications/editors/vim/plugins/get-plugins.nix b/pkgs/applications/editors/vim/plugins/utils/get-plugins.nix similarity index 100% rename from pkgs/applications/editors/vim/plugins/get-plugins.nix rename to pkgs/applications/editors/vim/plugins/utils/get-plugins.nix diff --git a/pkgs/applications/editors/vim/plugins/update.py b/pkgs/applications/editors/vim/plugins/utils/update.py similarity index 98% rename from pkgs/applications/editors/vim/plugins/update.py rename to pkgs/applications/editors/vim/plugins/utils/update.py index a973a1919eff..369b90de4a3a 100755 --- a/pkgs/applications/editors/vim/plugins/update.py +++ b/pkgs/applications/editors/vim/plugins/utils/update.py @@ -40,7 +40,7 @@ treesitter = importlib.import_module("nvim-treesitter.update") HEADER = ( - "# GENERATED by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!" + "# GENERATED by ./pkgs/applications/editors/vim/plugins/utils/update.py. Do not edit!" ) NIXPKGS_NVIMTREESITTER_FOLDER = "pkgs/applications/editors/vim/plugins/nvim-treesitter" diff --git a/pkgs/applications/editors/vim/plugins/updater.nix b/pkgs/applications/editors/vim/plugins/utils/updater.nix similarity index 92% rename from pkgs/applications/editors/vim/plugins/updater.nix rename to pkgs/applications/editors/vim/plugins/utils/updater.nix index 6ea8e60448d5..b2dbdf9fca41 100644 --- a/pkgs/applications/editors/vim/plugins/updater.nix +++ b/pkgs/applications/editors/vim/plugins/utils/updater.nix @@ -42,7 +42,7 @@ buildPythonApplication { neovim-unwrapped nurl ] - }" --prefix PYTHONPATH : "${./.}:${../../../../../maintainers/scripts/pluginupdate-py}" ) + }" --prefix PYTHONPATH : "${./.}:${../../../../../../maintainers/scripts/pluginupdate-py}" ) wrapPythonPrograms ''; diff --git a/pkgs/applications/editors/vim/plugins/vim-utils.nix b/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix similarity index 99% rename from pkgs/applications/editors/vim/plugins/vim-utils.nix rename to pkgs/applications/editors/vim/plugins/utils/vim-utils.nix index 820ca3d1ff91..dd12f9a442e6 100644 --- a/pkgs/applications/editors/vim/plugins/vim-utils.nix +++ b/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix @@ -423,7 +423,7 @@ rec { vimBinary = "${vim}/bin/vim"; inherit rtpPath; }; - } ./hooks/vim-gen-doc-hook.sh + } ../hooks/vim-gen-doc-hook.sh ) { }; vimCommandCheckHook = callPackage ( @@ -435,7 +435,7 @@ rec { vimBinary = "${neovim-unwrapped}/bin/nvim"; inherit rtpPath; }; - } ./hooks/vim-command-check-hook.sh + } ../hooks/vim-command-check-hook.sh ) { }; neovimRequireCheckHook = callPackage ( @@ -447,7 +447,7 @@ rec { nvimBinary = "${neovim-unwrapped}/bin/nvim"; inherit rtpPath; }; - } ./hooks/neovim-require-check-hook.sh + } ../hooks/neovim-require-check-hook.sh ) { }; inherit diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 83b12ea5784e..475fec9547bf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -123,7 +123,7 @@ with pkgs; common-updater-scripts = callPackage ../common-updater/scripts.nix { }; - vimPluginsUpdater = callPackage ../applications/editors/vim/plugins/updater.nix { + vimPluginsUpdater = callPackage ../applications/editors/vim/plugins/utils/updater.nix { inherit (python3Packages) buildPythonApplication ; }; @@ -17783,7 +17783,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) AppKit Security; }; - vimUtils = callPackage ../applications/editors/vim/plugins/vim-utils.nix { }; + vimUtils = callPackage ../applications/editors/vim/plugins/utils/vim-utils.nix { }; vimPlugins = recurseIntoAttrs (callPackage ../applications/editors/vim/plugins { });