2021-04-14 03:52:08 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook-mermaid";
|
2021-07-23 15:23:17 +01:00
|
|
|
version = "0.8.3";
|
2021-04-14 03:52:08 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "badboy";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-07-23 15:23:17 +01:00
|
|
|
sha256 = "sha256-maYFOlWNqKFmyDM2nDF25rzYnUXMlV9Ry9TMoXReUUg=";
|
2021-04-14 03:52:08 +01:00
|
|
|
};
|
|
|
|
|
2021-07-23 15:23:17 +01:00
|
|
|
cargoSha256 = "sha256-GL5Z4KfRu0zQAzVCWRIhaYtG5FrDdQabsbyFX7SjZvg=";
|
2021-04-14 03:52:08 +01:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A preprocessor for mdbook to add mermaid.js support";
|
|
|
|
homepage = "https://github.com/badboy/mdbook-mermaid";
|
|
|
|
license = [ licenses.mpl20 ];
|
|
|
|
maintainers = with maintainers; [ xrelkd ];
|
|
|
|
};
|
|
|
|
}
|