2023-01-20 10:41:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, CoreServices
|
|
|
|
}:
|
2021-04-15 00:37:46 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook-mermaid";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.12.6";
|
2021-04-15 00:37:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "badboy";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-1mSSnAfsg9AEnDAgINrSLIeu9O2vLqchZPSH12cjATk=";
|
2021-04-15 00:37:46 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
cargoHash = "sha256-9PMBHVpf8bDuSIYKrIFZjmBE2icejPTML+hhZ4DLq/Y=";
|
2021-04-15 00:37:46 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
CoreServices
|
|
|
|
];
|
2021-04-15 00:37:46 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A preprocessor for mdbook to add mermaid.js support";
|
|
|
|
homepage = "https://github.com/badboy/mdbook-mermaid";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/badboy/mdbook-mermaid/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mpl20;
|
2021-04-15 00:37:46 +00:00
|
|
|
maintainers = with maintainers; [ xrelkd ];
|
|
|
|
};
|
|
|
|
}
|