Merge pull request #300470 from chewblacka/update-docfd
docfd: 3.0.0 -> 4.0.0
This commit is contained in:
commit
7d69be0264
|
@ -1,13 +1,26 @@
|
|||
{ lib
|
||||
, ocamlPackages
|
||||
, stdenv
|
||||
, overrideSDK
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, dune_3
|
||||
, makeWrapper
|
||||
, pandoc
|
||||
, poppler_utils
|
||||
, testers
|
||||
, docfd
|
||||
}:
|
||||
|
||||
ocamlPackages.buildDunePackage rec {
|
||||
let
|
||||
# Needed for x86_64-darwin
|
||||
buildDunePackage' = ocamlPackages.buildDunePackage.override {
|
||||
stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
|
||||
};
|
||||
in
|
||||
buildDunePackage' rec {
|
||||
pname = "docfd";
|
||||
version = "3.0.0";
|
||||
version = "4.0.0";
|
||||
|
||||
minimalOCamlVersion = "5.1";
|
||||
|
||||
|
@ -15,10 +28,10 @@ ocamlPackages.buildDunePackage rec {
|
|||
owner = "darrenldl";
|
||||
repo = "docfd";
|
||||
rev = version;
|
||||
hash = "sha256-pJ5LlOfC+9NRfY7ng9LAxEnjr+mtJmhRNTo9Im6Lkbo=";
|
||||
hash = "sha256-fgwUXRZ6k5i3XLxXpjbrl0TJZMT+NkGXf7KNwRgi+q8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python3 dune_3 ];
|
||||
nativeBuildInputs = [ python3 dune_3 makeWrapper ];
|
||||
buildInputs = with ocamlPackages; [
|
||||
cmdliner
|
||||
containers-data
|
||||
|
@ -35,17 +48,21 @@ ocamlPackages.buildDunePackage rec {
|
|||
yojson
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/docfd --prefix PATH : "${lib.makeBinPath [ pandoc poppler_utils ]}"
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = docfd;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "TUI multiline fuzzy document finder";
|
||||
longDescription = ''
|
||||
Think interactive grep for both text and other document files, but
|
||||
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.
|
||||
Optional dependencies:
|
||||
fzf - for fuzzy file picker with "docfd ?".
|
||||
poppler_utils - for pdf search.
|
||||
pandoc - for .epub, .odt, .docx, .fb2, .ipynb, .html, & .htm files.
|
||||
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.
|
||||
'';
|
||||
homepage = "https://github.com/darrenldl/docfd";
|
||||
license = licenses.mit;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ buildDunePackage
|
||||
, lib
|
||||
, stdenv
|
||||
, dune-configurator
|
||||
, eio
|
||||
, fmt
|
||||
|
@ -14,6 +16,10 @@ buildDunePackage {
|
|||
|
||||
dontStrip = true;
|
||||
|
||||
env = lib.optionalAttrs stdenv.isDarwin {
|
||||
NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
dune-configurator
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue