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
|
{ lib
|
||||||
, ocamlPackages
|
, ocamlPackages
|
||||||
|
, stdenv
|
||||||
|
, overrideSDK
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, python3
|
, python3
|
||||||
, dune_3
|
, 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";
|
pname = "docfd";
|
||||||
version = "3.0.0";
|
version = "4.0.0";
|
||||||
|
|
||||||
minimalOCamlVersion = "5.1";
|
minimalOCamlVersion = "5.1";
|
||||||
|
|
||||||
|
@ -15,10 +28,10 @@ ocamlPackages.buildDunePackage rec {
|
||||||
owner = "darrenldl";
|
owner = "darrenldl";
|
||||||
repo = "docfd";
|
repo = "docfd";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-pJ5LlOfC+9NRfY7ng9LAxEnjr+mtJmhRNTo9Im6Lkbo=";
|
hash = "sha256-fgwUXRZ6k5i3XLxXpjbrl0TJZMT+NkGXf7KNwRgi+q8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ python3 dune_3 ];
|
nativeBuildInputs = [ python3 dune_3 makeWrapper ];
|
||||||
buildInputs = with ocamlPackages; [
|
buildInputs = with ocamlPackages; [
|
||||||
cmdliner
|
cmdliner
|
||||||
containers-data
|
containers-data
|
||||||
|
@ -35,17 +48,21 @@ ocamlPackages.buildDunePackage rec {
|
||||||
yojson
|
yojson
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/docfd --prefix PATH : "${lib.makeBinPath [ pandoc poppler_utils ]}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.tests.version = testers.testVersion {
|
||||||
|
package = docfd;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "TUI multiline fuzzy document finder";
|
description = "TUI multiline fuzzy document finder";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Think interactive grep for both text and other document files, but
|
Think interactive grep for text and other document files.
|
||||||
word/token based instead of regex and line based, so you can search
|
Word/token based instead of regex and line based, so you
|
||||||
across lines easily. Aims to provide good UX via integration with
|
can search across lines easily. Aims to provide good UX via
|
||||||
common text editors and other file viewers.
|
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.
|
|
||||||
'';
|
'';
|
||||||
homepage = "https://github.com/darrenldl/docfd";
|
homepage = "https://github.com/darrenldl/docfd";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{ buildDunePackage
|
{ buildDunePackage
|
||||||
|
, lib
|
||||||
|
, stdenv
|
||||||
, dune-configurator
|
, dune-configurator
|
||||||
, eio
|
, eio
|
||||||
, fmt
|
, fmt
|
||||||
|
@ -14,6 +16,10 @@ buildDunePackage {
|
||||||
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
||||||
|
env = lib.optionalAttrs stdenv.isDarwin {
|
||||||
|
NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
|
||||||
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
dune-configurator
|
dune-configurator
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user