nixpkgs/pkgs/applications/editors/vim/plugins/get-plugins.nix
Matthieu Coudron 8255903b71 neovimUtils.buildNeovimPluginFrom2Nix: rename to buildNeovimPlugin
buildNeovimPluginFrom2Nix was cargo-culted from buildVimPluginFrom2Nix
but this doesn't make sense.
From2Nix referred to a way of building plugins that is not used anymore
so buildVimPluginFrom2Nix could be renamed too.
2023-06-12 16:46:52 +02:00

20 lines
692 B
Nix

with import <localpkgs> {};
let
inherit (vimUtils.override {inherit vim;}) buildVimPluginFrom2Nix;
inherit (neovimUtils) buildNeovimPlugin;
generated = callPackage <localpkgs/pkgs/applications/editors/vim/plugins/generated.nix> {
inherit buildNeovimPlugin 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