2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildDunePackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, angstrom
|
|
|
|
, cmdliner
|
|
|
|
, core
|
|
|
|
, core_bench
|
2023-03-30 22:05:00 +00:00
|
|
|
, core_unix ? null
|
2022-07-14 12:49:19 +00:00
|
|
|
, js_of_ocaml
|
|
|
|
, js_of_ocaml-ppx
|
|
|
|
, ppx_deriving_yojson
|
|
|
|
, uri
|
|
|
|
, yojson
|
|
|
|
, lwt
|
|
|
|
, xmlm
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
angstrom' = angstrom.overrideAttrs (attrs: {
|
|
|
|
patches = attrs.patches or [ ] ++ [
|
|
|
|
# mldoc requires Angstrom to expose `unsafe_lookahead`
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/logseq/angstrom/commit/bbe36c99c13678937d4c983a427e02a733d6cc24.patch";
|
|
|
|
sha256 = "sha256-RapY1QJ8U0HOqJ9TFDnCYB4tFLFuThESzdBZqjYuDUA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
});
|
|
|
|
uri' = uri.override { angstrom = angstrom'; };
|
|
|
|
in
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "mldoc";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.5.8";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
minimalOCamlVersion = "4.10";
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
duneVersion = "3";
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "logseq";
|
|
|
|
repo = "mldoc";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-7uuNUFMSQEgakTKfpYixp43gnfpQSW++snBzgr0Ni0Y=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cmdliner
|
|
|
|
core
|
|
|
|
core_bench
|
2023-01-20 10:41:00 +00:00
|
|
|
core_unix
|
2022-07-14 12:49:19 +00:00
|
|
|
js_of_ocaml
|
|
|
|
js_of_ocaml-ppx
|
|
|
|
lwt
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
angstrom'
|
|
|
|
uri'
|
|
|
|
yojson
|
|
|
|
ppx_deriving_yojson
|
|
|
|
xmlm
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/logseq/mldoc";
|
|
|
|
description = "Another Emacs Org-mode and Markdown parser";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ marsam ];
|
|
|
|
};
|
|
|
|
}
|