2022-10-05 16:54:32 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, rustPlatform, CoreServices, graphviz }:
|
2021-10-12 19:37:04 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook-graphviz";
|
2022-02-20 17:15:09 +00:00
|
|
|
version = "0.1.4";
|
2021-10-12 19:37:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dylanowen";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-05 16:54:32 +00:00
|
|
|
hash = "sha256-HTHGb23wc10iAWXX/TNMXjTLWm+OSf1WWW1+/aQRcsk=";
|
2021-10-12 19:37:04 +00:00
|
|
|
};
|
|
|
|
|
2022-10-05 16:54:32 +00:00
|
|
|
cargoPatches = [
|
|
|
|
# Remove when updating mdbook-graphviz past 0.1.4.
|
|
|
|
./update-mdbook-for-rust-1.64.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
cargoHash = "sha256-keDyfXooPU/GOx56OTq5psDohfZ0E478bnWn0bbC29o=";
|
2021-10-12 19:37:04 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
|
|
|
|
|
|
|
|
checkInputs = [ graphviz ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A preprocessor for mdbook, rendering Graphviz graphs to HTML at build time.";
|
|
|
|
homepage = "https://github.com/dylanowen/mdbook-graphviz";
|
|
|
|
license = [ licenses.mpl20 ];
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|