Merge pull request #40136 from sh4r3m4n/fzf-fix

fzf: fix vim plugin patch phase
This commit is contained in:
xeji 2018-05-08 22:26:28 +02:00 committed by GitHub
commit 06ef2ec029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,8 +23,13 @@ buildGoPackage rec {
goDeps = ./deps.nix;
patchPhase = ''
sed -i -e "s|expand('<sfile>:h:h').'/bin/fzf'|'$bin/bin/fzf'|" plugin/fzf.vim
sed -i -e "s|expand('<sfile>:h:h').'/bin/fzf-tmux'|'$bin/bin/fzf-tmux'|" plugin/fzf.vim
sed -i -e "s|expand('<sfile>:h:h')|'$bin'|" plugin/fzf.vim
# Original and output files can't be the same
if cmp -s $src/plugin/fzf.vim plugin/fzf.vim; then
echo "Vim plugin patch not applied properly. Aborting" && \
exit 1
fi
'';
preInstall = ''