depot/third_party/nixpkgs/pkgs/tools/text/mdbook-kroki-preprocessor/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

40 lines
917 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-kroki-preprocessor";
version = "0.2.0";
src = fetchFromGitHub {
owner = "joelcourtney";
repo = "mdbook-kroki-preprocessor";
rev = "v${version}";
hash = "sha256-3BxIhJK0YWZBEbbNwMKixo1icEn+QKJwoskgIEaZcGQ=";
};
cargoHash = "sha256-9jIB80vtskpR3/QYhaA0JFw6IhIsS9VnCnJtE5RfDRk=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
];
meta = with lib; {
description = "Render Kroki diagrams from files or code blocks in mdbook";
homepage = "https://github.com/joelcourtney/mdbook-kroki-preprocessor";
license = licenses.gpl3Only;
maintainers = with maintainers; [ blaggacao ];
};
}