vimUtils.buildVimPlugin: prevent building twice

Don't set the `rtp` attribute using `overrideAttrs`. `overrideAttrs`
passes the attribute to the builder hence creates a different
derivation. This made vim plugins being built twice.
This commit is contained in:
ilkecan
2022-10-09 12:22:03 +02:00
committed by Matthieu Coudron
parent 9314243820
commit 448bb9bbae
@@ -8,6 +8,12 @@
}:
rec {
addRtp = drv:
drv // {
rtp = "${drv}";
overrideAttrs = f: addRtp (drv.overrideAttrs f);
};
buildVimPlugin = attrs@{
name ? "${attrs.pname}-${attrs.version}",
namePrefix ? "vimplugin-",
@@ -36,9 +42,7 @@ rec {
runHook postInstall
'';
});
in toVimPlugin(drv.overrideAttrs(oa: {
rtp = "${drv}";
}));
in addRtp drv;
buildVimPluginFrom2Nix = attrs: buildVimPlugin ({
# vim plugins may override this