vimPlugins: generate an overlay

let update.py generates generated.nix as an overlay.
This should help maintaining vim-plugins outside of nixpkgs, as one can
use update.py to generate an out-of-tree vimPlugins overlay.
This commit is contained in:
Matthieu Coudron
2021-05-17 00:40:25 +02:00
committed by Matthieu Coudron
parent ce0cabb49d
commit 8c63ac7893
3 changed files with 22 additions and 15 deletions
+4 -5
View File
@@ -47,9 +47,9 @@ def generate_nix(plugins: List[Tuple[str, str, pluginupdate.Plugin]], outfile: s
f.write(HEADER)
f.write(
"""
{ lib, buildVimPluginFrom2Nix, fetchFromGitHub, overrides ? (self: super: {}) }:
let
packages = ( self:
{ lib, buildVimPluginFrom2Nix, fetchFromGitHub }:
final: prev:
{"""
)
for owner, repo, plugin in sorted_plugins:
@@ -75,8 +75,7 @@ let
)
f.write(
"""
});
in lib.fix' (lib.extends overrides packages)
}
"""
)
print(f"updated {outfile}")