vifm: fix :help by pulling in perl to build depends

Without the change `:help` command failed to find the help as:

    $ rm -rfv ~/.config/vifm/ ~/.vifm
    $ vifm
    <in vifm>:help
    Error detected while processing command line:
    E149: Sorry, no help for vifm-app.txt

This happened because `tags` in `doc` directory was empty:

    $(top_srcdir)/data/vim/doc/plugin/tags: \
                               $(top_srcdir)/data/vim/doc/plugin/vifm-plugin.txt
        $(AM_V_GEN)mkdir -p ../data/vim/doc/plugin/; \
        if [ -n "$(PERL)" ]; then \
                $(srcdir)/helpztags "$(top_srcdir)/data/vim/doc/plugin"; \
        elif [ -n "$(VIM)" ]; then \
                vim -e -s -c 'helptags $(top_srcdir)/data/vim/doc/plugin|q'; \
        else \
                touch $@; \
        fi

The change pulls in `perl` into build depends to get tags working.
This commit is contained in:
Sergei Trofimovich 2023-02-08 08:24:36 +00:00
parent 29cfcee104
commit afd204905e

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, makeWrapper
, perl # used to generate help tags
, pkg-config
, ncurses, libX11
, util-linux, file, which, groff
@ -17,9 +18,14 @@ in stdenv.mkDerivation rec {
sha256 = "sha256-j+KBPr3Mz+ma7OArBdYqIJkVJdRrDM+67Dr2FMZlVog=";
};
nativeBuildInputs = [ pkg-config makeWrapper ];
nativeBuildInputs = [ perl pkg-config makeWrapper ];
buildInputs = [ ncurses libX11 util-linux file which groff ];
postPatch = ''
# Avoid '#!/usr/bin/env perl' reverences to build help.
patchShebangs --build src/helpztags
'';
postFixup = let
path = lib.makeBinPath
[ udisks2