mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
Merge pull request #136429 from teto/vim-remove-rtpPath
Vim remove share/runtime/NAME prefix from the installed folder
This commit is contained in:
commit
ed77db85ff
@ -84,6 +84,13 @@ rec {
|
|||||||
viAlias = true;
|
viAlias = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nvim_with_plug = neovim.override {
|
||||||
|
extraName = "-with-plug";
|
||||||
|
configure.plug.plugins = with pkgs.vimPlugins; [
|
||||||
|
vim-go
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# nixpkgs should detect that no wrapping is necessary
|
# nixpkgs should detect that no wrapping is necessary
|
||||||
nvimShouldntWrap = wrapNeovim2 "-should-not-wrap" nvimAutoDisableWrap;
|
nvimShouldntWrap = wrapNeovim2 "-should-not-wrap" nvimAutoDisableWrap;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir -p "$out"/bin
|
mkdir -p "$out"/bin
|
||||||
cp "${vimPlugins.vimacs}"/share/vim-plugins/vimacs/bin/vim $out/bin/vimacs
|
cp "${vimPlugins.vimacs}"/bin/vim $out/bin/vimacs
|
||||||
substituteInPlace "$out"/bin/vimacs \
|
substituteInPlace "$out"/bin/vimacs \
|
||||||
--replace '-vim}' '-@bin@/bin/vim}' \
|
--replace '-vim}' '-@bin@/bin/vim}' \
|
||||||
--replace '-gvim}' '-@bin@/bin/vim -g}' \
|
--replace '-gvim}' '-@bin@/bin/vim -g}' \
|
||||||
|
@ -19,7 +19,7 @@ rec {
|
|||||||
buildPhase ? "",
|
buildPhase ? "",
|
||||||
preInstall ? "",
|
preInstall ? "",
|
||||||
postInstall ? "",
|
postInstall ? "",
|
||||||
path ? lib.getName name,
|
path ? ".",
|
||||||
addonInfo ? null,
|
addonInfo ? null,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -99,10 +99,10 @@ self: super: {
|
|||||||
# The linked ruby code shows generates the required '.clang_complete' for cmake based projects
|
# The linked ruby code shows generates the required '.clang_complete' for cmake based projects
|
||||||
# https://gist.github.com/Mic92/135e83803ed29162817fce4098dec144
|
# https://gist.github.com/Mic92/135e83803ed29162817fce4098dec144
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
substituteInPlace "$out"/share/vim-plugins/clang_complete/plugin/clang_complete.vim \
|
substituteInPlace "$out"/plugin/clang_complete.vim \
|
||||||
--replace "let g:clang_library_path = '' + "''" + ''" "let g:clang_library_path='${llvmPackages.libclang.lib}/lib/libclang.so'"
|
--replace "let g:clang_library_path = '' + "''" + ''" "let g:clang_library_path='${llvmPackages.libclang.lib}/lib/libclang.so'"
|
||||||
|
|
||||||
substituteInPlace "$out"/share/vim-plugins/clang_complete/plugin/libclang.py \
|
substituteInPlace "$out"/plugin/libclang.py \
|
||||||
--replace "/usr/lib/clang" "${llvmPackages.clang.cc}/lib/clang"
|
--replace "/usr/lib/clang" "${llvmPackages.clang.cc}/lib/clang"
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
@ -110,7 +110,7 @@ self: super: {
|
|||||||
clighter8 = super.clighter8.overrideAttrs (old: {
|
clighter8 = super.clighter8.overrideAttrs (old: {
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
sed "/^let g:clighter8_libclang_path/s|')$|${llvmPackages.clang.cc.lib}/lib/libclang.so')|" \
|
sed "/^let g:clighter8_libclang_path/s|')$|${llvmPackages.clang.cc.lib}/lib/libclang.so')|" \
|
||||||
-i "$out"/share/vim-plugins/clighter8/plugin/clighter8.vim
|
-i "$out"/plugin/clighter8.vim
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ self: super: {
|
|||||||
|
|
||||||
direnv-vim = super.direnv-vim.overrideAttrs (oa: {
|
direnv-vim = super.direnv-vim.overrideAttrs (oa: {
|
||||||
preFixup = oa.preFixup or "" + ''
|
preFixup = oa.preFixup or "" + ''
|
||||||
substituteInPlace $out/share/vim-plugins/direnv.vim/autoload/direnv.vim \
|
substituteInPlace $out/autoload/direnv.vim \
|
||||||
--replace "let s:direnv_cmd = get(g:, 'direnv_cmd', 'direnv')" \
|
--replace "let s:direnv_cmd = get(g:, 'direnv_cmd', 'direnv')" \
|
||||||
"let s:direnv_cmd = get(g:, 'direnv_cmd', '${lib.getBin direnv}/bin/direnv')"
|
"let s:direnv_cmd = get(g:, 'direnv_cmd', '${lib.getBin direnv}/bin/direnv')"
|
||||||
'';
|
'';
|
||||||
@ -354,7 +354,7 @@ self: super: {
|
|||||||
propagatedBuildInputs = [ LanguageClient-neovim-bin ];
|
propagatedBuildInputs = [ LanguageClient-neovim-bin ];
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
substituteInPlace "$out"/share/vim-plugins/LanguageClient-neovim/autoload/LanguageClient.vim \
|
substituteInPlace "$out"/autoload/LanguageClient.vim \
|
||||||
--replace "let l:path = s:root . '/bin/'" "let l:path = '${LanguageClient-neovim-bin}' . '/bin/'"
|
--replace "let l:path = s:root . '/bin/'" "let l:path = '${LanguageClient-neovim-bin}' . '/bin/'"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@ -387,9 +387,9 @@ self: super: {
|
|||||||
|
|
||||||
minimap-vim = super.minimap-vim.overrideAttrs (old: {
|
minimap-vim = super.minimap-vim.overrideAttrs (old: {
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
substituteInPlace $out/share/vim-plugins/minimap.vim/plugin/minimap.vim \
|
substituteInPlace $out/plugin/minimap.vim \
|
||||||
--replace "code-minimap" "${code-minimap}/bin/code-minimap"
|
--replace "code-minimap" "${code-minimap}/bin/code-minimap"
|
||||||
substituteInPlace $out/share/vim-plugins/minimap.vim/bin/minimap_generator.sh \
|
substituteInPlace $out/bin/minimap_generator.sh \
|
||||||
--replace "code-minimap" "${code-minimap}/bin/code-minimap"
|
--replace "code-minimap" "${code-minimap}/bin/code-minimap"
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
@ -691,7 +691,7 @@ self: super: {
|
|||||||
|
|
||||||
vim-dasht = super.vim-dasht.overrideAttrs (old: {
|
vim-dasht = super.vim-dasht.overrideAttrs (old: {
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
substituteInPlace $out/share/vim-plugins/vim-dasht/autoload/dasht.vim \
|
substituteInPlace $out/autoload/dasht.vim \
|
||||||
--replace "['dasht']" "['${dasht}/bin/dasht']"
|
--replace "['dasht']" "['${dasht}/bin/dasht']"
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
@ -795,7 +795,7 @@ self: super: {
|
|||||||
in
|
in
|
||||||
super.vim-markdown-composer.overrideAttrs (oldAttrs: rec {
|
super.vim-markdown-composer.overrideAttrs (oldAttrs: rec {
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
substituteInPlace "$out"/share/vim-plugins/vim-markdown-composer/after/ftplugin/markdown/composer.vim \
|
substituteInPlace "$out"/after/ftplugin/markdown/composer.vim \
|
||||||
--replace "let l:args = [s:plugin_root . '/target/release/markdown-composer']" \
|
--replace "let l:args = [s:plugin_root . '/target/release/markdown-composer']" \
|
||||||
"let l:args = ['${vim-markdown-composer-bin}/bin/markdown-composer']"
|
"let l:args = ['${vim-markdown-composer-bin}/bin/markdown-composer']"
|
||||||
'';
|
'';
|
||||||
|
@ -7,7 +7,6 @@ vimPluginGenTags() {
|
|||||||
|
|
||||||
target="$out/@rtpPath@/$pname"
|
target="$out/@rtpPath@/$pname"
|
||||||
mkdir -p $out/@rtpPath@
|
mkdir -p $out/@rtpPath@
|
||||||
cp -r . $target
|
|
||||||
|
|
||||||
# build help tags
|
# build help tags
|
||||||
if [ -d "$target/doc" ]; then
|
if [ -d "$target/doc" ]; then
|
||||||
|
@ -185,7 +185,7 @@ let
|
|||||||
else (lib.optional (x ? name) x.name)
|
else (lib.optional (x ? name) x.name)
|
||||||
++ (x.names or []);
|
++ (x.names or []);
|
||||||
|
|
||||||
rtpPath = "share/vim-plugins";
|
rtpPath = ".";
|
||||||
|
|
||||||
nativeImpl = packages:
|
nativeImpl = packages:
|
||||||
(let
|
(let
|
||||||
@ -196,13 +196,14 @@ let
|
|||||||
ln -sf ${plugin}/${plugin.pname}-${plugin.version}-rocks/${plugin.pname}/${plugin.version}/* $out/pack/${packageName}/${dir}/${plugin.pname}/
|
ln -sf ${plugin}/${plugin.pname}-${plugin.version}-rocks/${plugin.pname}/${plugin.version}/* $out/pack/${packageName}/${dir}/${plugin.pname}/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
linkVimlPlugin = pluginPath: packageName: dir:
|
linkVimlPlugin = plugin: packageName: dir: ''
|
||||||
"ln -sf ${pluginPath}/${rtpPath}/* $out/pack/${packageName}/${dir}";
|
mkdir -p $out/pack/${packageName}/${dir}/${plugin.pname}
|
||||||
|
ln -sf ${plugin}/${rtpPath}/* $out/pack/${packageName}/${dir}/${plugin.pname}
|
||||||
|
'';
|
||||||
|
|
||||||
# (builtins.trace pluginPath )
|
link = pluginPath: if hasLuaModule pluginPath
|
||||||
link = pluginPath: if hasLuaModule pluginPath
|
then linkLuaPlugin pluginPath
|
||||||
then linkLuaPlugin pluginPath
|
else linkVimlPlugin pluginPath;
|
||||||
else linkVimlPlugin pluginPath;
|
|
||||||
|
|
||||||
packageLinks = (packageName: {start ? [], opt ? []}:
|
packageLinks = (packageName: {start ? [], opt ? []}:
|
||||||
let
|
let
|
||||||
|
Loading…
Reference in New Issue
Block a user