2017-05-11 08:35:54 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake }:
|
2016-01-04 09:06:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-05-10 20:56:45 +01:00
|
|
|
version = "0.27.1";
|
2016-01-04 09:06:37 +00:00
|
|
|
name = "cmark-${version}";
|
|
|
|
|
2017-05-11 08:35:54 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jgm";
|
|
|
|
repo = "cmark";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "06miwq3rl2bighkn6iq7bdwzmvcqa53qwpa0pqjqa8yn44j8ijj8";
|
2016-01-04 09:06:37 +00:00
|
|
|
};
|
|
|
|
|
2017-05-11 07:57:09 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2017-05-11 08:35:54 +01:00
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
|
|
export LD_LIBRARY_PATH=$(readlink -f ./src)
|
|
|
|
CTEST_OUTPUT_ON_FAILURE=1 make test
|
|
|
|
'';
|
2016-01-04 09:06:37 +00:00
|
|
|
|
2017-05-11 08:35:54 +01:00
|
|
|
meta = with stdenv.lib; {
|
2016-01-04 09:06:37 +00:00
|
|
|
description = "CommonMark parsing and rendering library and program in C";
|
|
|
|
homepage = https://github.com/jgm/cmark;
|
2017-05-11 08:35:54 +01:00
|
|
|
maintainers = [ maintainers.michelk ];
|
|
|
|
platforms = platforms.unix;
|
2016-01-04 09:06:37 +00:00
|
|
|
};
|
|
|
|
}
|