fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ lib
2, stdenv
3, fetchFromGitHub
4, cmake
5, pkg-config
6}:
7
8stdenv.mkDerivation rec {
9 pname = "md4c";
10 version = "0.4.8";
11
12 src = fetchFromGitHub {
13 owner = "mity";
14 repo = pname;
15 rev = "release-${version}";
16 hash = "sha256-+LObAD5JB8Vb4Rt4hTo1Z4ispxzfFkkXA2sw6TKB7Yo=";
17 };
18
19 patches = [
20 # We set CMAKE_INSTALL_LIBDIR to the absolute path in $out, so
21 # prefix and exec_prefix cannot be $out, too
22 # Use CMake's _FULL_ variables instead of `prefix` concatenation.
23 ./fix-pkgconfig.patch
24 ];
25
26 nativeBuildInputs = [
27 cmake
28 pkg-config
29 ];
30
31 meta = with lib; {
32 homepage = "https://github.com/mity/md4c";
33 description = "Markdown parser made in C";
34 longDescription = ''
35 MD4C is Markdown parser implementation in C, with the following features:
36
37 - Compliance: Generally, MD4C aims to be compliant to the latest version
38 of CommonMark specification. Currently, we are fully compliant to
39 CommonMark 0.29.
40 - Extensions: MD4C supports some commonly requested and accepted
41 extensions. See below.
42 - Performance: MD4C is very fast.
43 - Compactness: MD4C parser is implemented in one source file and one
44 header file. There are no dependencies other than standard C library.
45 - Embedding: MD4C parser is easy to reuse in other projects, its API is
46 very straightforward: There is actually just one function, md_parse().
47 - Push model: MD4C parses the complete document and calls few callback
48 functions provided by the application to inform it about a start/end of
49 every block, a start/end of every span, and with any textual contents.
50 - Portability: MD4C builds and works on Windows and POSIX-compliant
51 OSes. (It should be simple to make it run also on most other platforms,
52 at least as long as the platform provides C standard library, including
53 a heap memory management.)
54 - Encoding: MD4C by default expects UTF-8 encoding of the input
55 document. But it can be compiled to recognize ASCII-only control
56 characters (i.e. to disable all Unicode-specific code), or (on Windows)
57 to expect UTF-16 (i.e. what is on Windows commonly called just
58 "Unicode"). See more details below.
59 - Permissive license: MD4C is available under the MIT license.
60 '';
61 license = licenses.mit;
62 maintainers = with maintainers; [ AndersonTorres ];
63 platforms = platforms.all;
64 };
65}
66# TODO: enable tests (needs Python)