diff options
author | Nick Cao <nickcao@nichi.co> | 2024-02-11 13:06:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-11 13:06:46 -0500 |
commit | 4a97fef877703d95422065c46a6c1771e23e8e81 (patch) | |
tree | 91663178d25a8bc1bc3a546111bf4eebb834091a /pkgs/by-name | |
parent | ebddbb71b1516370a2c1e2362732ad0624c3daa5 (diff) | |
parent | 7786bf7565c5c4247fffaf50c24fc8dc5e7510b8 (diff) | |
download | nixlib-4a97fef877703d95422065c46a6c1771e23e8e81.tar nixlib-4a97fef877703d95422065c46a6c1771e23e8e81.tar.gz nixlib-4a97fef877703d95422065c46a6c1771e23e8e81.tar.bz2 nixlib-4a97fef877703d95422065c46a6c1771e23e8e81.tar.lz nixlib-4a97fef877703d95422065c46a6c1771e23e8e81.tar.xz nixlib-4a97fef877703d95422065c46a6c1771e23e8e81.tar.zst nixlib-4a97fef877703d95422065c46a6c1771e23e8e81.zip |
Merge pull request #287785 from chewblacka/fix-docfd
docfd: add fzf support
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/do/docfd/package.nix | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/pkgs/by-name/do/docfd/package.nix b/pkgs/by-name/do/docfd/package.nix index 6ed94576dc99..37df7724c26a 100644 --- a/pkgs/by-name/do/docfd/package.nix +++ b/pkgs/by-name/do/docfd/package.nix @@ -1,4 +1,4 @@ -{ lib, ocamlPackages, fetchFromGitHub, python3, dune_3, makeWrapper, poppler_utils }: +{ lib, ocamlPackages, fetchFromGitHub, python3, dune_3, makeWrapper, poppler_utils, fzf }: ocamlPackages.buildDunePackage rec { pname = "docfd"; @@ -14,26 +14,23 @@ ocamlPackages.buildDunePackage rec { }; nativeBuildInputs = [ python3 dune_3 makeWrapper ]; - buildInputs = [ poppler_utils ] ++ - (with ocamlPackages; [ oseq spelll notty nottui lwd cmdliner domainslib digestif yojson eio_main containers-data timedesc ]); + buildInputs = with ocamlPackages; [ oseq spelll notty nottui lwd cmdliner domainslib digestif yojson eio_main containers-data timedesc ]; postInstall = '' # docfd needs pdftotext from popler_utils to allow pdf search - wrapProgram $out/bin/docfd --prefix PATH : "${lib.getBin poppler_utils}/bin/" + # also fzf for "docfd ?" usage + wrapProgram $out/bin/docfd --prefix PATH : "${lib.makeBinPath [ poppler_utils fzf ]}" ''; meta = with lib; { description = "TUI multiline fuzzy document finder"; longDescription = '' - Interactive grep, but word/token/phrase based rather than regex - and line based, so you can search across multiple lines (simlar to - Recoll but TUI). - Aims to provide a good UX via text editor and PDF viewer integration. - When opening a text file, Docfd opens file at first line of search - result. If PDF, then Docfd opens file at first page of the search - result and starts a text search of the most unique word of the matched - phrase within the same page. - Main intended use case: navigating directories of notes and PDFs. + TUI multiline fuzzy document finder. + Think interactive grep for both text files and PDFs, but word/token based + instead of regex and line based, so you can search across lines easily. + Docfd aims to provide good UX via integration with common text editors + and PDF viewers, so you can jump directly to a search result with a + single key press. ''; homepage = "https://github.com/darrenldl/docfd"; license = licenses.mit; |