Merge pull request #56191 from tobim/restrict-vim-update
Restrict vim update.py to generated.nix
This commit is contained in:
commit
34aa254f9e
1 changed files with 8 additions and 4 deletions
|
@ -111,16 +111,20 @@ class Plugin:
|
|||
return copy
|
||||
|
||||
|
||||
GET_PLUGINS = """(with import <localpkgs> {};
|
||||
GET_PLUGINS = f"""(with import <localpkgs> {{}};
|
||||
let
|
||||
inherit (vimUtils.override {{inherit vim;}}) buildVimPluginFrom2Nix;
|
||||
generated = callPackage {ROOT}/generated.nix {{
|
||||
inherit buildVimPluginFrom2Nix;
|
||||
}};
|
||||
hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value;
|
||||
getChecksum = name: value:
|
||||
if hasChecksum value then {
|
||||
if hasChecksum value then {{
|
||||
submodules = value.src.fetchSubmodules or false;
|
||||
sha256 = value.src.outputHash;
|
||||
rev = value.src.rev;
|
||||
} else null;
|
||||
checksums = lib.mapAttrs getChecksum vimPlugins;
|
||||
}} else null;
|
||||
checksums = lib.mapAttrs getChecksum generated;
|
||||
in lib.filterAttrs (n: v: v != null) checksums)"""
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue