mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 10:12:58 +00:00
36 lines
911 B
Nix
36 lines
911 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "mdbook-d2";
|
|
version = "0.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "danieleades";
|
|
repo = "mdbook-d2";
|
|
rev = "v${version}";
|
|
hash = "sha256-IkMydlmUQrZbOZYzQFxzROhdwlcO0H6MzQo42fBEYQE=";
|
|
};
|
|
|
|
cargoHash = "sha256-xc00/FOQtAg2u8bZxaTbk8+gX7r+q9O8DKgWchPnOJc=";
|
|
doCheck = false;
|
|
|
|
buildInputs = lib.optionals stdenv.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 ];
|
|
};
|
|
}
|