diff options
author | Matthieu Coudron <teto@users.noreply.github.com> | 2023-04-14 22:02:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-14 22:02:17 +0200 |
commit | 351cec5db3b7ca839779316a8b7c524ea8941f0f (patch) | |
tree | e23cac70ebccb153439b0203ddee0a95253af676 /pkgs/applications/editors/vim/plugins/get-plugins.nix | |
parent | 1cb472891d198a07f81186abc8ebcd7acc85242a (diff) |
use subcommands in plugin updaters (#223164)
* update.py: introduce subparsers for plugin updaters This is preliminary work to help create more powerful plugin updaters. Namely I would like to be able to "just add" plugins without refreshing the older ones (helpful when github temporarily removes a user from github due to automated bot detection). Also concerning the lua updater, we pin some of the dependencies, and I would like to be able to unpin the package without editing the csv (coming in later PRs). * doc/updaters: update command to update editor plugins including vim, kakoune and lua packages Co-authored-by: figsoda
Diffstat (limited to 'pkgs/applications/editors/vim/plugins/get-plugins.nix')
-rw-r--r-- | pkgs/applications/editors/vim/plugins/get-plugins.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/applications/editors/vim/plugins/get-plugins.nix b/pkgs/applications/editors/vim/plugins/get-plugins.nix new file mode 100644 index 0000000000000..0aaec333c2d76 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/get-plugins.nix @@ -0,0 +1,19 @@ +with import <localpkgs> {}; +let + inherit (vimUtils.override {inherit vim;}) buildVimPluginFrom2Nix; + inherit (neovimUtils) buildNeovimPluginFrom2Nix; + + generated = callPackage <localpkgs/pkgs/applications/editors/vim/plugins/generated.nix> { + inherit buildNeovimPluginFrom2Nix buildVimPluginFrom2Nix; + } {} {}; + hasChecksum = value: + lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value; + getChecksum = name: value: + if hasChecksum value then { + submodules = value.src.fetchSubmodules or false; + sha256 = value.src.outputHash; + rev = value.src.rev; + } else null; + checksums = lib.mapAttrs getChecksum generated; +in + lib.filterAttrs (n: v: v != null) checksums |