nixpkgs-suyu/pkgs/development/libraries/cmark/default.nix

37 lines
843 B
Nix
Raw Normal View History

2021-10-04 16:10:32 +02:00
{ lib, stdenv, fetchFromGitHub, cmake }:
2016-01-04 10:06:37 +01:00
stdenv.mkDerivation rec {
pname = "cmark";
2021-10-04 16:10:32 +02:00
version = "0.30.2";
2016-01-04 10:06:37 +01:00
2017-05-11 09:35:54 +02:00
src = fetchFromGitHub {
owner = "jgm";
repo = pname;
2017-05-11 09:35:54 +02:00
rev = version;
2021-10-04 16:10:32 +02:00
sha256 = "sha256-IkNybUe/XYwAvPowym3aqfVyvNdw2t/brRjhOrjVRpA=";
2016-01-04 10:06:37 +01:00
};
2017-05-11 08:57:09 +02:00
nativeBuildInputs = [ cmake ];
cmakeFlags = [
2021-10-04 16:10:32 +02:00
# Link the executable with the shared library
"-DCMARK_STATIC=OFF"
];
doCheck = true;
preCheck = let
lib_path = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in ''
export ${lib_path}=$(readlink -f ./src)
2017-05-11 09:35:54 +02:00
'';
2016-01-04 10:06:37 +01:00
meta = with lib; {
2016-01-04 10:06:37 +01:00
description = "CommonMark parsing and rendering library and program in C";
homepage = "https://github.com/jgm/cmark";
2017-05-11 09:35:54 +02:00
maintainers = [ maintainers.michelk ];
platforms = platforms.unix;
2018-09-30 11:22:23 +02:00
license = licenses.bsd2;
2016-01-04 10:06:37 +01:00
};
}