In response to @timokau's review here are a couple changes: - Decrease the fragility of the replacement code by normalizing whitespace on each line. - Throw an error when plugins are renamed rather than silently aliasing to the new name.
parseDrvName
Instructions for adding Vim plugins to nixpkgs can be found here.
nixpkgs