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

Restrict vim update.py to generated.nix

authored by Jörg Thalheim and committed by GitHub 34aa254f 2e5c30c3

+8 -4
+8 -4
pkgs/misc/vim-plugins/update.py
··· 111 return copy 112 113 114 - GET_PLUGINS = """(with import <localpkgs> {}; 115 let 116 hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value; 117 getChecksum = name: value: 118 - if hasChecksum value then { 119 submodules = value.src.fetchSubmodules or false; 120 sha256 = value.src.outputHash; 121 rev = value.src.rev; 122 - } else null; 123 - checksums = lib.mapAttrs getChecksum vimPlugins; 124 in lib.filterAttrs (n: v: v != null) checksums)""" 125 126
··· 111 return copy 112 113 114 + GET_PLUGINS = f"""(with import <localpkgs> {{}}; 115 let 116 + inherit (vimUtils.override {{inherit vim;}}) buildVimPluginFrom2Nix; 117 + generated = callPackage {ROOT}/generated.nix {{ 118 + inherit buildVimPluginFrom2Nix; 119 + }}; 120 hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value; 121 getChecksum = name: value: 122 + if hasChecksum value then {{ 123 submodules = value.src.fetchSubmodules or false; 124 sha256 = value.src.outputHash; 125 rev = value.src.rev; 126 + }} else null; 127 + checksums = lib.mapAttrs getChecksum generated; 128 in lib.filterAttrs (n: v: v != null) checksums)""" 129 130