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

28 lines
911 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, graphviz }:
rustPlatform.buildRustPackage rec {
pname = "mdbook-graphviz";
version = "0.2.0";
src = fetchFromGitHub {
owner = "dylanowen";
repo = pname;
rev = "v${version}";
hash = "sha256-myASia/nkZmAf00lZ357Sh3YV73pCBrZAIRhSzFkZa0=";
};
cargoHash = "sha256-UB/l+rcVHkrHv/fybDy/UjrJbVksWgt9JRQC118/kGM=";
buildInputs = lib.optionals stdenv.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 ];
};
}