2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
ocamlPackages,
|
|
|
|
stdenv,
|
|
|
|
overrideSDK,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python3,
|
|
|
|
dune_3,
|
|
|
|
makeWrapper,
|
|
|
|
pandoc,
|
|
|
|
poppler_utils,
|
|
|
|
testers,
|
|
|
|
docfd,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
2024-02-07 01:22:34 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
let
|
|
|
|
# Needed for x86_64-darwin
|
|
|
|
buildDunePackage' = ocamlPackages.buildDunePackage.override {
|
2024-09-26 11:04:55 +00:00
|
|
|
stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv;
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
buildDunePackage' rec {
|
2024-02-07 01:22:34 +00:00
|
|
|
pname = "docfd";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "8.0.3";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
minimalOCamlVersion = "5.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "darrenldl";
|
|
|
|
repo = "docfd";
|
|
|
|
rev = version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-890/3iBruaQtWwlcvwuz4ujp7+P+5y1/2Axx4Iuik8Q=";
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3
|
|
|
|
dune_3
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
buildInputs = with ocamlPackages; [
|
|
|
|
cmdliner
|
|
|
|
containers-data
|
2024-09-19 14:19:46 +00:00
|
|
|
decompress
|
2024-04-21 15:54:59 +00:00
|
|
|
digestif
|
|
|
|
eio_main
|
|
|
|
lwd
|
|
|
|
nottui
|
|
|
|
notty
|
|
|
|
ocolor
|
|
|
|
oseq
|
2024-05-15 15:35:15 +00:00
|
|
|
ppx_deriving
|
|
|
|
ppxlib
|
|
|
|
re
|
2024-04-21 15:54:59 +00:00
|
|
|
spelll
|
|
|
|
timedesc
|
|
|
|
yojson
|
|
|
|
];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapProgram $out/bin/docfd --prefix PATH : "${
|
|
|
|
lib.makeBinPath [
|
|
|
|
pandoc
|
|
|
|
poppler_utils
|
|
|
|
]
|
|
|
|
}"
|
2024-02-07 01:22:34 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = docfd; };
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "TUI multiline fuzzy document finder";
|
|
|
|
longDescription = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
Think interactive grep for text and other document files.
|
|
|
|
Word/token based instead of regex and line based, so you
|
|
|
|
can search across lines easily. Aims to provide good UX via
|
|
|
|
integration with common text editors and other file viewers.
|
2024-02-07 01:22:34 +00:00
|
|
|
'';
|
|
|
|
homepage = "https://github.com/darrenldl/docfd";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ chewblacka ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
mainProgram = "docfd";
|
|
|
|
};
|
|
|
|
}
|