mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 10:53:11 +00:00
8255903b71
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.
20 lines
692 B
Nix
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
|