1{
2 lib,
3 ocamlPackages,
4 stdenv,
5 fetchFromGitHub,
6 python3,
7 dune_3,
8 makeWrapper,
9 pandoc,
10 poppler-utils,
11 testers,
12 docfd,
13}:
14
15ocamlPackages.buildDunePackage rec {
16 pname = "docfd";
17 version = "11.0.1";
18
19 minimalOCamlVersion = "5.1";
20
21 src = fetchFromGitHub {
22 owner = "darrenldl";
23 repo = "docfd";
24 rev = version;
25 hash = "sha256-uRC2QBn4gAfS9u85YaNH2Mm2C0reP8FnDHbyloY+OC8=";
26 };
27
28 nativeBuildInputs = [
29 python3
30 dune_3
31 makeWrapper
32 ];
33
34 buildInputs = with ocamlPackages; [
35 cmdliner
36 containers-data
37 decompress
38 diet
39 digestif
40 eio_main
41 lwd
42 nottui
43 notty
44 ocaml_sqlite3
45 ocolor
46 oseq
47 ppx_deriving
48 ppxlib
49 progress
50 re
51 spelll
52 timedesc
53 uuseg
54 yojson
55 ];
56
57 postInstall = ''
58 wrapProgram $out/bin/docfd --prefix PATH : "${
59 lib.makeBinPath [
60 pandoc
61 poppler-utils
62 ]
63 }"
64 '';
65
66 passthru.tests.version = testers.testVersion { package = docfd; };
67
68 meta = with lib; {
69 description = "TUI multiline fuzzy document finder";
70 longDescription = ''
71 Think interactive grep for text and other document files.
72 Word/token based instead of regex and line based, so you
73 can search across lines easily. Aims to provide good UX via
74 integration with common text editors and other file viewers.
75 '';
76 homepage = "https://github.com/darrenldl/docfd";
77 license = licenses.mit;
78 maintainers = with maintainers; [ chewblacka ];
79 platforms = platforms.all;
80 mainProgram = "docfd";
81 };
82}