1 { lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-OFNp+kFDafYbzqb7xfPTO885cAjgWfNeDvUPDKq5GJU=";
14 cargoHash = "sha256-95W0gERjwL9r0+DOgxQu+sjSFSThWeShLAqlDQiGxFw=";
16 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
19 description = "Preprocessor for mdbook to add inline Table of Contents support";
20 mainProgram = "mdbook-toc";
21 homepage = "https://github.com/badboy/mdbook-toc";
22 license = [ licenses.mpl20 ];
23 maintainers = with maintainers; [ matthiasbeyer ];