about summary refs log tree commit diff
path: root/pkgs/applications/editors/vim/plugins/get-plugins.nix
blob: 0aaec333c2d766b4a4b7a4bf7f7fa7a83cd79ed0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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