diff --git a/boehmgc-coroutine-sp-fallback.diff b/dep-patches/boehmgc-coroutine-sp-fallback.diff similarity index 100% rename from boehmgc-coroutine-sp-fallback.diff rename to dep-patches/boehmgc-coroutine-sp-fallback.diff diff --git a/boehmgc-traceable_allocator-public.diff b/dep-patches/boehmgc-traceable_allocator-public.diff similarity index 100% rename from boehmgc-traceable_allocator-public.diff rename to dep-patches/boehmgc-traceable_allocator-public.diff diff --git a/dep-patches/cmark-allow-nested-documents.diff b/dep-patches/cmark-allow-nested-documents.diff new file mode 100644 index 000000000000..5e12761cc77b --- /dev/null +++ b/dep-patches/cmark-allow-nested-documents.diff @@ -0,0 +1,27 @@ +diff --git a/api_test/main.c b/api_test/main.c +index c2db737..9bc5748 100644 +--- a/api_test/main.c ++++ b/api_test/main.c +@@ -456,6 +456,7 @@ void hierarchy(test_batch_runner *runner) { + + int list_item_flag = 1 << CMARK_NODE_ITEM; + int top_level_blocks = ++ (1 << CMARK_NODE_DOCUMENT) | + (1 << CMARK_NODE_BLOCK_QUOTE) | (1 << CMARK_NODE_LIST) | + (1 << CMARK_NODE_CODE_BLOCK) | (1 << CMARK_NODE_HTML_BLOCK) | + (1 << CMARK_NODE_PARAGRAPH) | (1 << CMARK_NODE_HEADING) | +diff --git a/src/node.c b/src/node.c +index c90b0d4..64a4ed7 100644 +--- a/src/node.c ++++ b/src/node.c +@@ -39,10 +39,6 @@ static bool S_can_contain(cmark_node *node, cmark_node *child) { + } + } + +- if (child->type == CMARK_NODE_DOCUMENT) { +- return false; +- } +- + switch (node->type) { + case CMARK_NODE_DOCUMENT: + case CMARK_NODE_BLOCK_QUOTE: diff --git a/flake.nix b/flake.nix index 5b52bbf04ce7..7b33c9350956 100644 --- a/flake.nix +++ b/flake.nix @@ -163,10 +163,17 @@ enableLargeConfig = true; }).overrideAttrs(o: { patches = (o.patches or []) ++ [ - ./boehmgc-coroutine-sp-fallback.diff + ./dep-patches/boehmgc-coroutine-sp-fallback.diff # https://github.com/ivmai/bdwgc/pull/586 - ./boehmgc-traceable_allocator-public.diff + ./dep-patches/boehmgc-traceable_allocator-public.diff + ]; + }); + + cmark-nix = final.cmark.overrideAttrs (o: { + patches = (o.patches or []) ++ [ + # https://github.com/commonmark/cmark/pull/522 + ./dep-patches/cmark-allow-nested-documents.diff ]; }); @@ -188,6 +195,7 @@ ; officialRelease = false; boehmgc = final.boehmgc-nix; + cmark = final.cmark-nix; libgit2 = final.libgit2-nix; busybox-sandbox-shell = final.busybox-sandbox-shell or final.default-busybox-sandbox-shell; changelog-d = final.changelog-d-nix; diff --git a/package.nix b/package.nix index 41ce50ac440a..10094c81c4bd 100644 --- a/package.nix +++ b/package.nix @@ -175,7 +175,6 @@ in { ./mk (fileset.fileFilter (f: lib.strings.hasPrefix "nix-profile" f.name) ./scripts) ] ++ lib.optionals doBuild [ - ./boehmgc-coroutine-sp-fallback.diff ./doc ./misc ./precompiled-headers.h