Move misc/vim-plugins to applications/editors/vim/plugins

This commit is contained in:
AndersonTorres 2022-02-16 11:55:43 -03:00
parent a212281392
commit 3f19fc37a3
29 changed files with 21 additions and 19 deletions

View File

@ -98,7 +98,7 @@ We use jbidwatcher as an example for a discontinued project here.
1. Create a new branch for your change, e.g. `git checkout -b jbidwatcher`
1. Remove the actual package including its directory, e.g. `rm -rf pkgs/applications/misc/jbidwatcher`
1. Remove the package from the list of all packages (`pkgs/top-level/all-packages.nix`).
1. Add an alias for the package name in `pkgs/top-level/aliases.nix` (There is also `pkgs/misc/vim-plugins/aliases.nix`. Package sets typically do not have aliases, so we can't add them there.)
1. Add an alias for the package name in `pkgs/top-level/aliases.nix` (There is also `pkgs/applications/editors/vim/plugins/aliases.nix`. Package sets typically do not have aliases, so we can't add them there.)
For example in this case:

View File

@ -309,9 +309,9 @@ Sample output2:
## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs}
Nix expressions for Vim plugins are stored in [pkgs/misc/vim-plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/misc/vim-plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/update.py). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]@[gitref]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
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 [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py). 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). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]@[gitref]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/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:
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:
```nix
deoplete-fish = super.deoplete-fish.overrideAttrs(old: {
@ -330,13 +330,13 @@ Finally, there are some plugins that are also packaged in nodePackages because t
Run the update script with a GitHub API token that has at least `public_repo` access. Running the script without the token is likely to result in rate-limiting (429 errors). For steps on creating an API token, please refer to [GitHub's token documentation](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token).
```sh
GITHUB_API_TOKEN=my_token ./pkgs/misc/vim-plugins/update.py
GITHUB_API_TOKEN=my_token ./pkgs/applications/editors/vim/plugins/update.py
```
Alternatively, set the number of processes to a lower count to avoid rate-limiting.
```sh
./pkgs/misc/vim-plugins/update.py --proc 1
./pkgs/applications/editors/vim/plugins/update.py --proc 1
```
## Important repositories {#important-repositories}

View File

@ -1,4 +1,4 @@
# Used by pkgs/misc/vim-plugins/update.py and pkgs/applications/editors/kakoune/plugins/update.py
# Used by pkgs/applications/editors/vim/plugins/update.py and pkgs/applications/editors/kakoune/plugins/update.py
# format:
# $ nix run nixpkgs.python3Packages.black -c black update.py

View File

@ -1,4 +1,4 @@
# This file has been generated by ./pkgs/misc/vim-plugins/update.py. Do not edit!
# This file has been generated by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!
{ lib, buildVimPluginFrom2Nix, fetchFromGitHub, fetchgit }:
final: prev:

View File

@ -414,7 +414,7 @@ self: super: {
markdown-preview-nvim = super.markdown-preview-nvim.overrideAttrs (old: let
# We only need its dependencies `node-modules`.
nodeDep = nodePackages."markdown-preview-nvim-../../misc/vim-plugins/markdown-preview-nvim".overrideAttrs (old: {
nodeDep = nodePackages."markdown-preview-nvim-../../applications/editors/vim/plugins/markdown-preview-nvim".overrideAttrs (old: {
dontNpmInstall = true;
});
in {

View File

@ -47,7 +47,7 @@ let
in lib.filterAttrs (n: v: v != null) checksums)"""
HEADER = (
"# This file has been generated by ./pkgs/misc/vim-plugins/update.py. Do not edit!"
"# This file has been generated by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!"
)

View File

@ -82,7 +82,8 @@ See vimHelpTags sample code below.
CONTRIBUTING AND CUSTOMIZING
============================
The example file pkgs/misc/vim-plugins/default.nix provides both:
The example file pkgs/applications/editors/vim/plugins/default.nix provides
both:
* manually mantained plugins
* plugins created by VAM's nix#ExportPluginsForNix implementation

View File

@ -198,7 +198,7 @@
, "markdownlint-cli"
, "markdownlint-cli2"
, "markdown-link-check"
, {"markdown-preview-nvim": "../../misc/vim-plugins/markdown-preview-nvim"}
, {"markdown-preview-nvim": "../../applications/editors/vim/plugins/markdown-preview-nvim"}
, "mastodon-bot"
, "mathjax"
, "meat"

View File

@ -107807,11 +107807,11 @@ in
bypassCache = true;
reconstructLock = true;
};
"markdown-preview-nvim-../../misc/vim-plugins/markdown-preview-nvim" = nodeEnv.buildNodePackage {
"markdown-preview-nvim-../../applications/editors/vim/plugins/markdown-preview-nvim" = nodeEnv.buildNodePackage {
name = "markdown-preview-vim";
packageName = "markdown-preview-vim";
version = "0.0.1";
src = ../../misc/vim-plugins/markdown-preview-nvim;
src = ../../applications/editors/vim/plugins/markdown-preview-nvim;
dependencies = [
sources."accepts-1.3.8"
sources."after-0.8.2"

View File

@ -2,7 +2,8 @@
rustPlatform.buildRustPackage rec {
pname = "statix";
# also update version of the vim plugin in pkgs/misc/vim-plugins/overrides.nix
# also update version of the vim plugin in
# pkgs/applications/editors/vim/plugins/overrides.nix
# the version can be found in flake.nix of the source code
version = "0.5.4";

View File

@ -1,5 +1,5 @@
{ stdenv
, lib
{ lib
, stdenv
, fetchgit
, libbsd
, readline
@ -8,6 +8,7 @@
stdenv.mkDerivation rec {
pname = "rosie";
version = "unstable-2020-01-11";
src = fetchgit {
url = "https://gitlab.com/rosie-pattern-language/rosie";
rev = "670e9027563609ba2ea31e14e2621a1302742795";

View File

@ -33999,12 +33999,11 @@ with pkgs;
viewnior = callPackage ../applications/graphics/viewnior { };
vimUtils = callPackage ../misc/vim-plugins/vim-utils.nix {
vimUtils = callPackage ../applications/editors/vim/plugins/vim-utils.nix {
inherit (lua51Packages) hasLuaModule;
};
vimPlugins = recurseIntoAttrs (callPackage ../misc/vim-plugins {
vimPlugins = recurseIntoAttrs (callPackage ../applications/editors/vim/plugins {
llvmPackages = llvmPackages_6;
luaPackages = lua51Packages;
});