nixpkgs/pkgs/tools/text/mdbook-mermaid/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
880 B
Nix
Raw Normal View History

2023-01-20 06:02:38 +00:00
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
CoreServices,
}:
2021-04-14 02:52:08 +00:00
rustPlatform.buildRustPackage rec {
pname = "mdbook-mermaid";
2024-09-23 10:04:20 +00:00
version = "0.14.0";
2021-04-14 02:52:08 +00:00
src = fetchFromGitHub {
owner = "badboy";
repo = pname;
2023-01-20 06:02:38 +00:00
rev = "refs/tags/v${version}";
2024-09-23 10:04:20 +00:00
hash = "sha256-elDKxtGMLka9Ss5CNnzw32ndxTUliNUgPXp7e4KUmBo=";
2021-04-14 02:52:08 +00:00
};
2024-09-23 10:04:20 +00:00
cargoHash = "sha256-BnbllOsidqDEfKs0pd6AzFjzo51PKm9uFSwmOGTW3ug=";
2021-04-14 02:52:08 +00:00
2023-01-20 06:02:38 +00:00
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
CoreServices
];
2021-04-14 02:52:08 +00:00
meta = with lib; {
description = "Preprocessor for mdbook to add mermaid.js support";
mainProgram = "mdbook-mermaid";
2021-04-14 02:52:08 +00:00
homepage = "https://github.com/badboy/mdbook-mermaid";
2023-01-20 06:02:38 +00:00
changelog = "https://github.com/badboy/mdbook-mermaid/blob/v${version}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [
xrelkd
matthiasbeyer
];
2021-04-14 02:52:08 +00:00
};
}