From 8afc781161d3e814ca75a4d3c0bdab0adcbceb24 Mon Sep 17 00:00:00 2001 From: John Garcia Date: Sat, 10 Feb 2024 14:23:02 +0000 Subject: [PATCH 1/2] docfd: add fzf support --- pkgs/by-name/do/docfd/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/do/docfd/package.nix b/pkgs/by-name/do/docfd/package.nix index 6ed94576dc998..0a26165011803 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,12 +14,12 @@ 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; { From 7786bf7565c5c4247fffaf50c24fc8dc5e7510b8 Mon Sep 17 00:00:00 2001 From: John Garcia Date: Sun, 11 Feb 2024 16:42:59 +0000 Subject: [PATCH 2/2] docfd: change long description --- pkgs/by-name/do/docfd/package.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/do/docfd/package.nix b/pkgs/by-name/do/docfd/package.nix index 0a26165011803..37df7724c26a1 100644 --- a/pkgs/by-name/do/docfd/package.nix +++ b/pkgs/by-name/do/docfd/package.nix @@ -25,15 +25,12 @@ ocamlPackages.buildDunePackage rec { 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;