···11-{ lib, ocamlPackages, fetchFromGitHub, python3, dune_3, makeWrapper, poppler_utils }:
11+{ lib, ocamlPackages, fetchFromGitHub, python3, dune_3, makeWrapper, poppler_utils, fzf }:
2233ocamlPackages.buildDunePackage rec {
44 pname = "docfd";
···1414 };
15151616 nativeBuildInputs = [ python3 dune_3 makeWrapper ];
1717- buildInputs = [ poppler_utils ] ++
1818- (with ocamlPackages; [ oseq spelll notty nottui lwd cmdliner domainslib digestif yojson eio_main containers-data timedesc ]);
1717+ buildInputs = with ocamlPackages; [ oseq spelll notty nottui lwd cmdliner domainslib digestif yojson eio_main containers-data timedesc ];
19182019 postInstall = ''
2120 # docfd needs pdftotext from popler_utils to allow pdf search
2222- wrapProgram $out/bin/docfd --prefix PATH : "${lib.getBin poppler_utils}/bin/"
2121+ # also fzf for "docfd ?" usage
2222+ wrapProgram $out/bin/docfd --prefix PATH : "${lib.makeBinPath [ poppler_utils fzf ]}"
2323 '';
24242525 meta = with lib; {
2626 description = "TUI multiline fuzzy document finder";
2727 longDescription = ''
2828- Interactive grep, but word/token/phrase based rather than regex
2929- and line based, so you can search across multiple lines (simlar to
3030- Recoll but TUI).
3131- Aims to provide a good UX via text editor and PDF viewer integration.
3232- When opening a text file, Docfd opens file at first line of search
3333- result. If PDF, then Docfd opens file at first page of the search
3434- result and starts a text search of the most unique word of the matched
3535- phrase within the same page.
3636- Main intended use case: navigating directories of notes and PDFs.
2828+ TUI multiline fuzzy document finder.
2929+ Think interactive grep for both text files and PDFs, but word/token based
3030+ instead of regex and line based, so you can search across lines easily.
3131+ Docfd aims to provide good UX via integration with common text editors
3232+ and PDF viewers, so you can jump directly to a search result with a
3333+ single key press.
3734 '';
3835 homepage = "https://github.com/darrenldl/docfd";
3936 license = licenses.mit;