2021-07-07 22:21:12 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
|
2018-02-23 10:22:30 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "mdbook";
|
2022-04-08 10:36:29 +01:00
|
|
|
version = "0.4.17";
|
2018-02-23 10:22:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-08 08:03:03 +01:00
|
|
|
owner = "rust-lang";
|
2018-02-23 10:22:30 +00:00
|
|
|
repo = "mdBook";
|
2018-07-14 19:33:02 +01:00
|
|
|
rev = "v${version}";
|
2022-04-08 10:36:29 +01:00
|
|
|
sha256 = "sha256-08ccRiOBXYqueKfyi/Ry39O2xOXUKishgqhn6RdbvUE=";
|
2018-02-23 10:22:30 +00:00
|
|
|
};
|
|
|
|
|
2022-04-08 10:36:29 +01:00
|
|
|
cargoSha256 = "sha256-vXUjKpCGlHlBvXLtmGkFtHRxxZakiEzuNzReFGEl6dw=";
|
2018-02-23 10:22:30 +00:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
|
2018-02-23 10:22:30 +00:00
|
|
|
|
2022-03-31 07:56:21 +01:00
|
|
|
# Tests rely on unset 'RUST_LOG' value to emit INFO messages.
|
|
|
|
# 'RUST_LOG=' nixpkgs default enables warnings only and breaks tests.
|
|
|
|
# Can be removed when https://github.com/rust-lang/mdBook/pull/1777
|
|
|
|
# is released.
|
|
|
|
logLevel = "info";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-02-23 10:22:30 +00:00
|
|
|
description = "Create books from MarkDown";
|
2021-08-08 08:03:03 +01:00
|
|
|
homepage = "https://github.com/rust-lang/mdBook";
|
2019-08-04 21:55:28 +01:00
|
|
|
license = [ licenses.mpl20 ];
|
2018-02-23 10:22:30 +00:00
|
|
|
maintainers = [ maintainers.havvy ];
|
|
|
|
};
|
|
|
|
}
|