Merge pull request #287785 from chewblacka/fix-docfd

docfd: add fzf support

authored by Nick Cao and committed by GitHub 4a97fef8 ebddbb71

+10 -13
+10 -13
pkgs/by-name/do/docfd/package.nix
··· 1 - { lib, ocamlPackages, fetchFromGitHub, python3, dune_3, makeWrapper, poppler_utils }: 2 3 ocamlPackages.buildDunePackage rec { 4 pname = "docfd"; ··· 14 }; 15 16 nativeBuildInputs = [ python3 dune_3 makeWrapper ]; 17 - buildInputs = [ poppler_utils ] ++ 18 - (with ocamlPackages; [ oseq spelll notty nottui lwd cmdliner domainslib digestif yojson eio_main containers-data timedesc ]); 19 20 postInstall = '' 21 # docfd needs pdftotext from popler_utils to allow pdf search 22 - wrapProgram $out/bin/docfd --prefix PATH : "${lib.getBin poppler_utils}/bin/" 23 ''; 24 25 meta = with lib; { 26 description = "TUI multiline fuzzy document finder"; 27 longDescription = '' 28 - Interactive grep, but word/token/phrase based rather than regex 29 - and line based, so you can search across multiple lines (simlar to 30 - Recoll but TUI). 31 - Aims to provide a good UX via text editor and PDF viewer integration. 32 - When opening a text file, Docfd opens file at first line of search 33 - result. If PDF, then Docfd opens file at first page of the search 34 - result and starts a text search of the most unique word of the matched 35 - phrase within the same page. 36 - Main intended use case: navigating directories of notes and PDFs. 37 ''; 38 homepage = "https://github.com/darrenldl/docfd"; 39 license = licenses.mit;
··· 1 + { lib, ocamlPackages, fetchFromGitHub, python3, dune_3, makeWrapper, poppler_utils, fzf }: 2 3 ocamlPackages.buildDunePackage rec { 4 pname = "docfd"; ··· 14 }; 15 16 nativeBuildInputs = [ python3 dune_3 makeWrapper ]; 17 + buildInputs = with ocamlPackages; [ oseq spelll notty nottui lwd cmdliner domainslib digestif yojson eio_main containers-data timedesc ]; 18 19 postInstall = '' 20 # docfd needs pdftotext from popler_utils to allow pdf search 21 + # also fzf for "docfd ?" usage 22 + wrapProgram $out/bin/docfd --prefix PATH : "${lib.makeBinPath [ poppler_utils fzf ]}" 23 ''; 24 25 meta = with lib; { 26 description = "TUI multiline fuzzy document finder"; 27 longDescription = '' 28 + TUI multiline fuzzy document finder. 29 + Think interactive grep for both text files and PDFs, but word/token based 30 + instead of regex and line based, so you can search across lines easily. 31 + Docfd aims to provide good UX via integration with common text editors 32 + and PDF viewers, so you can jump directly to a search result with a 33 + single key press. 34 ''; 35 homepage = "https://github.com/darrenldl/docfd"; 36 license = licenses.mit;