depot/third_party/nixpkgs/pkgs/tools/text/mdbook-mermaid/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

33 lines
844 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, CoreServices
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-mermaid";
version = "0.13.0";
src = fetchFromGitHub {
owner = "badboy";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Qyt5N6Fito++5lpjDXlzupmguue9kc409IpaDkIRgxw=";
};
cargoHash = "sha256-ji38ZNOZ+SDL7+9dvaRIA38EsqMqYWpSmZntexJqcMU=";
buildInputs = lib.optionals stdenv.isDarwin [
CoreServices
];
meta = with lib; {
description = "Preprocessor for mdbook to add mermaid.js support";
mainProgram = "mdbook-mermaid";
homepage = "https://github.com/badboy/mdbook-mermaid";
changelog = "https://github.com/badboy/mdbook-mermaid/blob/v${version}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [ xrelkd matthiasbeyer ];
};
}