Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
35 lines
924 B
Nix
35 lines
924 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "mdbook-d2";
|
|
version = "0.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "danieleades";
|
|
repo = "mdbook-d2";
|
|
rev = "v${version}";
|
|
hash = "sha256-5/vChjSYMlCcieA10jncoXZw9Gpeol+Am7mUo78Zqho=";
|
|
};
|
|
|
|
cargoHash = "sha256-lZ92vvRYXEBMx6ka8RP1wXctf73QNp5rNE8n7O96AEc=";
|
|
doCheck = false;
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "D2 diagram generator plugin for MdBook";
|
|
mainProgram = "mdbook-d2";
|
|
homepage = "https://github.com/danieleades/mdbook-d2";
|
|
changelog = "https://github.com/danieleades/mdbook-d2/blob/${src.rev}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ blaggacao matthiasbeyer ];
|
|
};
|
|
}
|