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
+5 -6
View File
@@ -1,8 +1,7 @@
# Deprecated aliases - for backward compatibility
lib:
lib: overriden:
with overriden;
final: prev:
let
# Removing recurseForDerivation prevents derivations of aliased attribute
@@ -21,12 +20,12 @@ let
# Make sure that we are not shadowing something from
# all-packages.nix.
checkInPkgs = n: alias: if builtins.hasAttr n overriden
checkInPkgs = n: alias: if builtins.hasAttr n prev
then throw "Alias ${n} is still in vim-plugins"
else alias;
mapAliases = aliases:
lib.mapAttrs (n: alias: removeDistribute
lib.mapAttrs (n: alias: removeDistribute
(removeRecurseForDerivations
(checkInPkgs n alias)))
aliases;
@@ -36,7 +35,7 @@ let
) (builtins.fromJSON (builtins.readFile ./deprecated.json));
in
mapAliases ({
mapAliases (with prev; {
airline = vim-airline;
alternative = a-vim; # backwards compat, added 2014-10-21
bats = bats-vim;