at 23.11-beta 69 lines 1.4 kB view raw
1{ lib 2, buildDunePackage 3, fetchFromGitHub 4, fetchpatch 5, angstrom 6, cmdliner 7, core 8, core_bench 9, core_unix ? null 10, js_of_ocaml 11, js_of_ocaml-ppx 12, ppx_deriving_yojson 13, uri 14, yojson 15, lwt 16, xmlm 17}: 18let 19 angstrom' = angstrom.overrideAttrs (attrs: { 20 patches = attrs.patches or [ ] ++ [ 21 # mldoc requires Angstrom to expose `unsafe_lookahead` 22 (fetchpatch { 23 url = "https://github.com/logseq/angstrom/commit/bbe36c99c13678937d4c983a427e02a733d6cc24.patch"; 24 sha256 = "sha256-RapY1QJ8U0HOqJ9TFDnCYB4tFLFuThESzdBZqjYuDUA="; 25 }) 26 ]; 27 }); 28 uri' = uri.override { angstrom = angstrom'; }; 29in 30buildDunePackage rec { 31 pname = "mldoc"; 32 version = "1.5.8"; 33 34 minimalOCamlVersion = "4.10"; 35 36 duneVersion = "3"; 37 38 src = fetchFromGitHub { 39 owner = "logseq"; 40 repo = "mldoc"; 41 rev = "v${version}"; 42 hash = "sha256-7uuNUFMSQEgakTKfpYixp43gnfpQSW++snBzgr0Ni0Y="; 43 }; 44 45 buildInputs = [ 46 cmdliner 47 core 48 core_bench 49 core_unix 50 js_of_ocaml 51 js_of_ocaml-ppx 52 lwt 53 ]; 54 55 propagatedBuildInputs = [ 56 angstrom' 57 uri' 58 yojson 59 ppx_deriving_yojson 60 xmlm 61 ]; 62 63 meta = with lib; { 64 homepage = "https://github.com/logseq/mldoc"; 65 description = "Another Emacs Org-mode and Markdown parser"; 66 license = licenses.agpl3Only; 67 maintainers = with maintainers; [ marsam ]; 68 }; 69}