2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, darwin }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook";
|
2021-02-24 18:30:23 +00:00
|
|
|
version = "0.4.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rust-lang-nursery";
|
|
|
|
repo = "mdBook";
|
|
|
|
rev = "v${version}";
|
2021-02-24 18:30:23 +00:00
|
|
|
sha256 = "sha256-51S4I1YIbdgXkhuT7KnhJe71nGCQmr9JmuGtp7Bcxqo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-24 18:30:23 +00:00
|
|
|
cargoSha256 = "sha256-2kBJcImytsSd7Q0kj1bsP/NXxyy2Pr8gHb8iNf6h3/4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Create books from MarkDown";
|
|
|
|
homepage = "https://github.com/rust-lang-nursery/mdbook";
|
|
|
|
license = [ licenses.mpl20 ];
|
|
|
|
maintainers = [ maintainers.havvy ];
|
|
|
|
};
|
|
|
|
}
|