1{
2 lib,
3 stdenv,
4 rtpPath,
5 toVimPlugin,
6}:
7
8{
9 addRtp = drv: lib.warn "`addRtp` is deprecated, does nothing." drv;
10
11 buildVimPlugin =
12 {
13 name ? "${attrs.pname}-${attrs.version}",
14 src,
15 unpackPhase ? "",
16 configurePhase ? ":",
17 buildPhase ? ":",
18 preInstall ? "",
19 postInstall ? "",
20 path ? ".",
21 addonInfo ? null,
22 meta ? { },
23 ...
24 }@attrs:
25 let
26 drv = stdenv.mkDerivation (
27 attrs
28 // {
29 name = lib.warnIf (attrs ? vimprefix) "The 'vimprefix' is now hardcoded in toVimPlugin" name;
30
31 __structuredAttrs = true;
32 inherit
33 unpackPhase
34 configurePhase
35 buildPhase
36 addonInfo
37 preInstall
38 postInstall
39 ;
40
41 installPhase = ''
42 runHook preInstall
43
44 target=$out/${rtpPath}/${path}
45 mkdir -p $out/${rtpPath}
46 cp -r . $target
47
48 runHook postInstall
49 '';
50
51 meta = {
52 platforms = lib.platforms.all;
53 }
54 // meta;
55 }
56 );
57 in
58 toVimPlugin drv;
59
60}