vimPlugins: replace -> replace-fail
This commit is contained in:
@@ -310,13 +310,13 @@ in
|
||||
preFixup =
|
||||
''
|
||||
substituteInPlace "$out"/plugin/clang_complete.vim \
|
||||
--replace "let g:clang_library_path = ''
|
||||
--replace-fail "let g:clang_library_path = ''
|
||||
+ "''"
|
||||
+ ''
|
||||
" "let g:clang_library_path='${lib.getLib llvmPackages.libclang}/lib/libclang.so'"
|
||||
|
||||
substituteInPlace "$out"/plugin/libclang.py \
|
||||
--replace "/usr/lib/clang" "${llvmPackages.clang.cc}/lib/clang"
|
||||
--replace-fail "/usr/lib/clang" "${llvmPackages.clang.cc}/lib/clang"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -667,8 +667,8 @@ in
|
||||
];
|
||||
buildPhase = ''
|
||||
substituteInPlace lua/wincent/commandt/lib/Makefile \
|
||||
--replace '/bin/bash' 'bash' \
|
||||
--replace xcrun ""
|
||||
--replace-fail '/bin/bash' 'bash' \
|
||||
--replace-fail xcrun ""
|
||||
make build
|
||||
rm ruby/command-t/ext/command-t/*.o
|
||||
'';
|
||||
@@ -742,7 +742,7 @@ in
|
||||
copilot-vim = super.copilot-vim.overrideAttrs (old: {
|
||||
postInstall = ''
|
||||
substituteInPlace $out/autoload/copilot/client.vim \
|
||||
--replace " let node = get(g:, 'copilot_node_command', ''\'''\')" \
|
||||
--replace-fail " let node = get(g:, 'copilot_node_command', ''\'''\')" \
|
||||
" let node = get(g:, 'copilot_node_command', '${nodejs}/bin/node')"
|
||||
'';
|
||||
|
||||
@@ -863,7 +863,7 @@ in
|
||||
denops-vim = super.denops-vim.overrideAttrs {
|
||||
postPatch = ''
|
||||
# Use Nix's Deno instead of an arbitrary install
|
||||
substituteInPlace ./autoload/denops.vim --replace "call denops#_internal#conf#define('denops#deno', 'deno')" "call denops#_internal#conf#define('denops#deno', '${deno}/bin/deno')"
|
||||
substituteInPlace ./autoload/denops.vim --replace-fail "call denops#_internal#conf#define('denops#deno', 'deno')" "call denops#_internal#conf#define('denops#deno', '${deno}/bin/deno')"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -912,7 +912,7 @@ in
|
||||
old.preFixup or ""
|
||||
+ ''
|
||||
substituteInPlace $out/autoload/direnv.vim \
|
||||
--replace "let s:direnv_cmd = get(g:, 'direnv_cmd', 'direnv')" \
|
||||
--replace-fail "let s:direnv_cmd = get(g:, 'direnv_cmd', 'direnv')" \
|
||||
"let s:direnv_cmd = get(g:, 'direnv_cmd', '${lib.getBin direnv}/bin/direnv')"
|
||||
'';
|
||||
});
|
||||
@@ -1009,7 +1009,7 @@ in
|
||||
];
|
||||
configurePhase = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace \
|
||||
--replace-fail \
|
||||
"nim c" \
|
||||
"nim c --nimcache:$TMP --path:${nimpy} --path:${binaryheap}"
|
||||
'';
|
||||
@@ -1217,7 +1217,7 @@ in
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lua/image/magick.lua \
|
||||
--replace @nix_magick@ ${luajitPackages.magick}
|
||||
--replace-fail @nix_magick@ ${luajitPackages.magick}
|
||||
'';
|
||||
|
||||
nvimRequireCheck = "image";
|
||||
@@ -1267,7 +1267,7 @@ in
|
||||
buildInputs = [ curl ];
|
||||
postPatch = ''
|
||||
substituteInPlace lua/kulala/config/init.lua \
|
||||
--replace 'curl_path = "curl"' 'curl_path = "${lib.getExe curl}"'
|
||||
--replace-fail 'curl_path = "curl"' 'curl_path = "${lib.getExe curl}"'
|
||||
'';
|
||||
nvimRequireCheck = "kulala";
|
||||
};
|
||||
@@ -1559,9 +1559,9 @@ in
|
||||
minimap-vim = super.minimap-vim.overrideAttrs {
|
||||
preFixup = ''
|
||||
substituteInPlace $out/plugin/minimap.vim \
|
||||
--replace "code-minimap" "${code-minimap}/bin/code-minimap"
|
||||
--replace-fail "code-minimap" "${code-minimap}/bin/code-minimap"
|
||||
substituteInPlace $out/bin/minimap_generator.sh \
|
||||
--replace "code-minimap" "${code-minimap}/bin/code-minimap"
|
||||
--replace-fail "code-minimap" "${code-minimap}/bin/code-minimap"
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
@@ -2191,7 +2191,7 @@ in
|
||||
nvim-teal-maker = super.nvim-teal-maker.overrideAttrs {
|
||||
postPatch = ''
|
||||
substituteInPlace lua/tealmaker/init.lua \
|
||||
--replace cyan ${luaPackages.cyan}/bin/cyan
|
||||
--replace-fail cyan ${luaPackages.cyan}/bin/cyan
|
||||
'';
|
||||
vimCommandCheck = "TealBuild";
|
||||
};
|
||||
@@ -2387,7 +2387,7 @@ in
|
||||
;
|
||||
postPatch = ''
|
||||
substituteInPlace plugin/phpactor.vim \
|
||||
--replace "g:phpactorpath = expand('<sfile>:p:h') . '/..'" "g:phpactorpath = '${phpactor}'"
|
||||
--replace-fail "g:phpactorpath = expand('<sfile>:p:h') . '/..'" "g:phpactorpath = '${phpactor}'"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -2399,6 +2399,7 @@ in
|
||||
nvimRequireCheck = "nvim-treesitter-playground";
|
||||
};
|
||||
|
||||
# TODO: runtimedeps
|
||||
plenary-nvim = super.plenary-nvim.overrideAttrs {
|
||||
postPatch = ''
|
||||
sed -Ei lua/plenary/curl.lua \
|
||||
@@ -2466,7 +2467,7 @@ in
|
||||
patches = [ ./patches/ranger.nvim/fix-paths.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lua/ranger-nvim.lua --replace '@ranger@' ${ranger}/bin/ranger
|
||||
substituteInPlace lua/ranger-nvim.lua --replace-fail '@ranger@' ${ranger}/bin/ranger
|
||||
'';
|
||||
nvimRequireCheck = "ranger-nvim";
|
||||
};
|
||||
@@ -2475,8 +2476,8 @@ in
|
||||
patches = [ ./patches/aider.nvim/fix-paths.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lua/aider.lua --replace '@aider@' ${aider-chat}/bin/aider
|
||||
substituteInPlace lua/helpers.lua --replace '@aider@' ${aider-chat}/bin/aider
|
||||
substituteInPlace lua/aider.lua --replace-fail '@aider@' ${aider-chat}/bin/aider
|
||||
substituteInPlace lua/helpers.lua --replace-fail '@aider@' ${aider-chat}/bin/aider
|
||||
'';
|
||||
nvimRequireCheck = "aider";
|
||||
};
|
||||
@@ -2669,16 +2670,16 @@ in
|
||||
| grep -F 'version = "${version}"'
|
||||
|
||||
cd vim-plugin
|
||||
substituteInPlace ftplugin/nix.vim --replace statix ${statix}/bin/statix
|
||||
substituteInPlace plugin/statix.vim --replace statix ${statix}/bin/statix
|
||||
substituteInPlace ftplugin/nix.vim --replace-fail statix ${statix}/bin/statix
|
||||
substituteInPlace plugin/statix.vim --replace-fail statix ${statix}/bin/statix
|
||||
'';
|
||||
};
|
||||
|
||||
stylish-nvim = super.stylish-nvim.overrideAttrs {
|
||||
postPatch = ''
|
||||
substituteInPlace lua/stylish/common/mouse_hover_handler.lua --replace xdotool ${xdotool}/bin/xdotool
|
||||
substituteInPlace lua/stylish/components/menu.lua --replace xdotool ${xdotool}/bin/xdotool
|
||||
substituteInPlace lua/stylish/components/menu.lua --replace xwininfo ${xorg.xwininfo}/bin/xwininfo
|
||||
substituteInPlace lua/stylish/common/mouse_hover_handler.lua --replace-fail xdotool ${xdotool}/bin/xdotool
|
||||
substituteInPlace lua/stylish/components/menu.lua --replace-fail xdotool ${xdotool}/bin/xdotool
|
||||
substituteInPlace lua/stylish/components/menu.lua --replace-fail xwininfo ${xorg.xwininfo}/bin/xwininfo
|
||||
'';
|
||||
nvimRequireCheck = "stylish";
|
||||
};
|
||||
@@ -2943,7 +2944,7 @@ in
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lua/telescope/_extensions/zoxide/config.lua \
|
||||
--replace "zoxide query -ls" "${zoxide}/bin/zoxide query -ls"
|
||||
--replace-fail "zoxide query -ls" "${zoxide}/bin/zoxide query -ls"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -2982,7 +2983,7 @@ in
|
||||
patches = [ ./patches/tsc.nvim/fix-path.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lua/tsc/utils.lua --replace '@tsc@' ${typescript}/bin/tsc
|
||||
substituteInPlace lua/tsc/utils.lua --replace-fail '@tsc@' ${typescript}/bin/tsc
|
||||
'';
|
||||
|
||||
# Unit test
|
||||
@@ -3135,7 +3136,7 @@ in
|
||||
vim-agda = super.vim-agda.overrideAttrs {
|
||||
preFixup = ''
|
||||
substituteInPlace "$out"/autoload/agda.vim \
|
||||
--replace "jobstart(['agda'" "jobstart(['${agda}/bin/agda'"
|
||||
--replace-fail "jobstart(['agda'" "jobstart(['${agda}/bin/agda'"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -3179,7 +3180,7 @@ in
|
||||
vim-dasht = super.vim-dasht.overrideAttrs {
|
||||
preFixup = ''
|
||||
substituteInPlace $out/autoload/dasht.vim \
|
||||
--replace "['dasht']" "['${dasht}/bin/dasht']"
|
||||
--replace-fail "['dasht']" "['${dasht}/bin/dasht']"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -3280,7 +3281,7 @@ in
|
||||
vim-isort = super.vim-isort.overrideAttrs {
|
||||
postPatch = ''
|
||||
substituteInPlace ftplugin/python_vimisort.vim \
|
||||
--replace 'import vim' 'import vim; import sys; sys.path.append("${python3.pkgs.isort}/${python3.sitePackages}")'
|
||||
--replace-fail 'import vim' 'import vim; import sys; sys.path.append("${python3.pkgs.isort}/${python3.sitePackages}")'
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -3331,7 +3332,7 @@ in
|
||||
postPatch =
|
||||
old.postPatch or ""
|
||||
+ ''
|
||||
substituteInPlace ftplugin/haskell/stylish-haskell.vim --replace \
|
||||
substituteInPlace ftplugin/haskell/stylish-haskell.vim --replace-fail \
|
||||
'g:stylish_haskell_command = "stylish-haskell"' \
|
||||
'g:stylish_haskell_command = "${stylish-haskell}/bin/stylish-haskell"'
|
||||
'';
|
||||
@@ -3363,10 +3364,10 @@ in
|
||||
buildInputs = [ python3 ];
|
||||
patchPhase = ''
|
||||
substituteInPlace plugin/wakatime.vim \
|
||||
--replace 'autocmd BufEnter,VimEnter' \
|
||||
'autocmd VimEnter' \
|
||||
--replace 'autocmd CursorMoved,CursorMovedI' \
|
||||
'autocmd CursorMoved,CursorMovedI,BufEnter'
|
||||
--replace-fail 'autocmd BufEnter,VimEnter' \
|
||||
'autocmd VimEnter' \
|
||||
--replace-fail 'autocmd CursorMoved,CursorMovedI' \
|
||||
'autocmd CursorMoved,CursorMovedI,BufEnter'
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -3377,7 +3378,7 @@ in
|
||||
vim-xkbswitch = super.vim-xkbswitch.overrideAttrs {
|
||||
patchPhase = ''
|
||||
substituteInPlace plugin/xkbswitch.vim \
|
||||
--replace /usr/local/lib/libxkbswitch.so ${xkb-switch}/lib/libxkbswitch.so
|
||||
--replace-fail /usr/local/lib/libxkbswitch.so ${xkb-switch}/lib/libxkbswitch.so
|
||||
'';
|
||||
buildInputs = [ xkb-switch ];
|
||||
};
|
||||
@@ -3385,7 +3386,7 @@ in
|
||||
vim-yapf = super.vim-yapf.overrideAttrs {
|
||||
buildPhase = ''
|
||||
substituteInPlace ftplugin/python_yapf.vim \
|
||||
--replace '"yapf"' '"${python3.pkgs.yapf}/bin/yapf"'
|
||||
--replace-fail '"yapf"' '"${python3.pkgs.yapf}/bin/yapf"'
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -3399,8 +3400,8 @@ in
|
||||
vimacs = super.vimacs.overrideAttrs {
|
||||
buildPhase = ''
|
||||
substituteInPlace bin/vim \
|
||||
--replace '/usr/bin/vim' 'vim' \
|
||||
--replace '/usr/bin/gvim' 'gvim'
|
||||
--replace-fail '/usr/bin/vim' 'vim' \
|
||||
--replace-fail '/usr/bin/gvim' 'gvim'
|
||||
# remove unnecessary duplicated bin wrapper script
|
||||
rm -r plugin/vimacs
|
||||
'';
|
||||
@@ -3436,11 +3437,12 @@ in
|
||||
vimproc-vim = super.vimproc-vim.overrideAttrs {
|
||||
buildInputs = [ which ];
|
||||
|
||||
# TODO: revisit
|
||||
buildPhase = ''
|
||||
substituteInPlace autoload/vimproc.vim \
|
||||
--replace vimproc_mac.so vimproc_unix.so \
|
||||
--replace vimproc_linux64.so vimproc_unix.so \
|
||||
--replace vimproc_linux32.so vimproc_unix.so
|
||||
--replace-fail vimproc_mac.so vimproc_unix.so \
|
||||
--replace-fail vimproc_linux64.so vimproc_unix.so \
|
||||
--replace-fail vimproc_linux32.so vimproc_unix.so
|
||||
make -f make_unix.mak
|
||||
'';
|
||||
};
|
||||
@@ -3509,7 +3511,7 @@ in
|
||||
YouCompleteMe = super.YouCompleteMe.overrideAttrs {
|
||||
buildPhase = ''
|
||||
substituteInPlace plugin/youcompleteme.vim \
|
||||
--replace "'ycm_path_to_python_interpreter', '''" \
|
||||
--replace-fail "'ycm_path_to_python_interpreter', '''" \
|
||||
"'ycm_path_to_python_interpreter', '${python3}/bin/python3'"
|
||||
|
||||
rm -r third_party/ycmd
|
||||
@@ -3588,7 +3590,7 @@ in
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace autoload/zoxide.vim \
|
||||
--replace "'zoxide_executable', 'zoxide'" "'zoxide_executable', '${zoxide}/bin/zoxide'"
|
||||
--replace-fail "'zoxide_executable', 'zoxide'" "'zoxide_executable', '${zoxide}/bin/zoxide'"
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user