7 # sanitizeDerivationName
8 normalizeName = lib.replaceStrings [ "." ] [ "-" ];
11 # function to create vim plugin from lua packages that are already packaged in
14 # the lua attribute name that matches this vim plugin. Both should be equal
15 # in the majority of cases but we make it possible to have different attribute names
16 luaAttr ? (normalizeName attrs.pname)
20 originalLuaDrv = lua.pkgs.${luaAttr};
22 luaDrv = originalLuaDrv.overrideAttrs (oa: {
23 version = attrs.version or oa.version;
24 rockspecVersion = oa.rockspecVersion;
27 -- to create a flat hierarchy
28 lua_modules_path = "lua"
32 finalDrv = toVimPlugin (luaDrv.overrideAttrs(oa: attrs // {
33 nativeBuildInputs = oa.nativeBuildInputs or [] ++ [
34 lua.pkgs.luarocksMoveDataFolder
36 version = "${originalLuaDrv.version}-unstable-${oa.version}";