1 { lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, graphviz }:
3 rustPlatform.buildRustPackage rec {
4 pname = "mdbook-graphviz";
7 src = fetchFromGitHub {
11 hash = "sha256-QLgTUQWfGoUV7L+nZKyO7yBYFi8/puikWkmDHQihc50=";
14 cargoHash = "sha256-cMCNZ8Ezp7bFx4EnuZCXhqoaE0yN3iK9KnCYBYGPHKc=";
16 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
18 nativeCheckInputs = [ graphviz ];
21 description = "Preprocessor for mdbook, rendering Graphviz graphs to HTML at build time";
22 mainProgram = "mdbook-graphviz";
23 homepage = "https://github.com/dylanowen/mdbook-graphviz";
24 changelog = "https://github.com/dylanowen/mdbook-graphviz/releases/tag/v${version}";
25 license = [ licenses.mpl20 ];
26 maintainers = with maintainers; [ lovesegfault matthiasbeyer ];