summary refs log tree commit diff
path: root/pkgs/tools/text/mdbook/default.nix
blob: a8c5efb0a4935f0606fd08eabf7e905b2f0c9815 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, darwin }:

rustPlatform.buildRustPackage rec {
  pname = "mdbook";
  version = "0.4.9";

  src = fetchFromGitHub {
    owner = "rust-lang-nursery";
    repo = "mdBook";
    rev = "v${version}";
    sha256 = "sha256-wc3poiLnIHbbl0j2sWQkEbxccpohPnvjLPdNuKfsDSY=";
  };

  cargoSha256 = "sha256-2DNfacPp9IMke2j8WYxpGmMxityaFGyXrc0jOyqPl3c=";

  buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];

  meta = with lib; {
    description = "Create books from MarkDown";
    homepage = "https://github.com/rust-lang-nursery/mdbook";
    license = [ licenses.mpl20 ];
    maintainers = [ maintainers.havvy ];
  };
}