Commit 448bb9bb authored by ilkecan's avatar ilkecan Committed by Matthieu Coudron
Browse files

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.
parent 93142438
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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