2018-02-23 11:22:30 +01:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
name = "mdbook-${version}";
|
2018-07-14 20:33:02 +02:00
|
|
|
version = "0.1.8";
|
2018-02-23 11:22:30 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rust-lang-nursery";
|
|
|
|
repo = "mdBook";
|
2018-07-14 20:33:02 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1xmw4v19ff6mvimwk5l437wslzw5npy60zdb8r4319bjf32pw9pn";
|
2018-02-23 11:22:30 +01:00
|
|
|
};
|
|
|
|
|
2018-07-14 20:33:02 +02:00
|
|
|
cargoSha256 = "0kcc0b2644qbalz7dnqwxsjdmw1h57k0rjrvwqh8apj2sgl64gyv";
|
2018-02-23 11:22:30 +01:00
|
|
|
|
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Create books from MarkDown";
|
|
|
|
homepage = https://github.com/rust-lang-nursery/mdbook;
|
|
|
|
license = [ licenses.asl20 licenses.mit ];
|
|
|
|
maintainers = [ maintainers.havvy ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
|
|
|
# Because CoreServices needs to be updated,
|
|
|
|
# but Apple won't release the source.
|
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
};
|
|
|
|
}
|