depot/pkgs/tools/text/mdbook-graphviz/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

28 lines
924 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, graphviz }:
rustPlatform.buildRustPackage rec {
pname = "mdbook-graphviz";
version = "0.2.1";
src = fetchFromGitHub {
owner = "dylanowen";
repo = pname;
rev = "v${version}";
hash = "sha256-QLgTUQWfGoUV7L+nZKyO7yBYFi8/puikWkmDHQihc50=";
};
cargoHash = "sha256-cMCNZ8Ezp7bFx4EnuZCXhqoaE0yN3iK9KnCYBYGPHKc=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
nativeCheckInputs = [ graphviz ];
meta = with lib; {
description = "Preprocessor for mdbook, rendering Graphviz graphs to HTML at build time";
mainProgram = "mdbook-graphviz";
homepage = "https://github.com/dylanowen/mdbook-graphviz";
changelog = "https://github.com/dylanowen/mdbook-graphviz/releases/tag/v${version}";
license = [ licenses.mpl20 ];
maintainers = with maintainers; [ lovesegfault matthiasbeyer ];
};
}