Merge pull request #56191 from tobim/restrict-vim-update

Restrict vim update.py to generated.nix
This commit is contained in:
Jörg Thalheim 2019-03-03 22:12:45 +00:00 committed by GitHub
commit 34aa254f9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)"""