2023-04-29 16:46:19 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook-d2";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.3.1";
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "danieleades";
|
|
|
|
repo = "mdbook-d2";
|
2024-09-19 14:19:46 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-5/vChjSYMlCcieA10jncoXZw9Gpeol+Am7mUo78Zqho=";
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-lZ92vvRYXEBMx6ka8RP1wXctf73QNp5rNE8n7O96AEc=";
|
|
|
|
doCheck = false;
|
2023-04-29 16:46:19 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
2023-04-29 16:46:19 +00:00
|
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "D2 diagram generator plugin for MdBook";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "mdbook-d2";
|
2023-04-29 16:46:19 +00:00
|
|
|
homepage = "https://github.com/danieleades/mdbook-d2";
|
|
|
|
changelog = "https://github.com/danieleades/mdbook-d2/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ blaggacao matthiasbeyer ];
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
}
|