summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2019-03-03 22:12:45 +0000
committerGitHub <noreply@github.com>2019-03-03 22:12:45 +0000
commit34aa254f9ebf5899636a9927ceefbc9df80230f4 (patch)
treefe8f81ff64a6d3c3b8e2426853f380b23f2d30fb /pkgs
parent2e5c30c3b6ce6cddd722900fb778c2b7bd5c545b (diff)
parent134a061d935dff774293aa0ae1764a560200778a (diff)
downloadnixpkgs-34aa254f9ebf5899636a9927ceefbc9df80230f4.tar
nixpkgs-34aa254f9ebf5899636a9927ceefbc9df80230f4.tar.gz
nixpkgs-34aa254f9ebf5899636a9927ceefbc9df80230f4.tar.bz2
nixpkgs-34aa254f9ebf5899636a9927ceefbc9df80230f4.tar.lz
nixpkgs-34aa254f9ebf5899636a9927ceefbc9df80230f4.tar.xz
nixpkgs-34aa254f9ebf5899636a9927ceefbc9df80230f4.tar.zst
nixpkgs-34aa254f9ebf5899636a9927ceefbc9df80230f4.zip
Merge pull request #56191 from tobim/restrict-vim-update
Restrict vim update.py to generated.nix
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/misc/vim-plugins/update.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/misc/vim-plugins/update.py b/pkgs/misc/vim-plugins/update.py
index d3412822fdf..8a8e20da8d7 100755
--- a/pkgs/misc/vim-plugins/update.py
+++ b/pkgs/misc/vim-plugins/update.py
@@ -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)"""