1{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "mdbook-toc";
5 version = "0.9.0";
6
7 src = fetchFromGitHub {
8 owner = "badboy";
9 repo = pname;
10 rev = version;
11 sha256 = "sha256-7JpMBQqglLn33HwMBuIR5Hc0ISmzLPjQXGJVRwwl4OU=";
12 };
13
14 cargoSha256 = "sha256-Vj9DSjJtkexKly8IWlGEQkVrjSHcK1/2i+2g2Ht0eUo=";
15
16 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
17
18 meta = with lib; {
19 description = "A preprocessor for mdbook to add inline Table of Contents support";
20 homepage = "https://github.com/badboy/mdbook-toc";
21 license = [ licenses.mpl20 ];
22 maintainers = with maintainers; [ matthiasbeyer ];
23 };
24}
25