2022-07-16 00:45:46 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, nix, rustPlatform, CoreServices }:
|
2018-02-23 10:22:30 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 11:41:23 +00:00
|
|
|
pname = "mdbook";
|
2023-06-30 06:10:51 +00:00
|
|
|
version = "0.4.31";
|
2018-02-23 10:22:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-08 07:03:03 +00:00
|
|
|
owner = "rust-lang";
|
2018-02-23 10:22:30 +00:00
|
|
|
repo = "mdBook";
|
2022-12-15 17:29:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-06-30 06:10:51 +00:00
|
|
|
sha256 = "sha256-OUhZ94bW1+tmUPm/NLlL+Ummm2rtkJTBnNZ00hsTO5I=";
|
2018-02-23 10:22:30 +00:00
|
|
|
};
|
|
|
|
|
2023-06-30 06:10:51 +00:00
|
|
|
cargoHash = "sha256-u8764RKgC35Z18KHw4AAxETPlACrMnVyz4/Aa2HQyEw=";
|
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-07-16 00:45:46 +00:00
|
|
|
passthru = {
|
|
|
|
tests = {
|
|
|
|
inherit nix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
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 07:03:03 +00:00
|
|
|
homepage = "https://github.com/rust-lang/mdBook";
|
2022-12-15 17:29:45 +00:00
|
|
|
changelog = "https://github.com/rust-lang/mdBook/blob/v${version}/CHANGELOG.md";
|
2019-08-04 20:55:28 +00:00
|
|
|
license = [ licenses.mpl20 ];
|
2022-12-15 17:46:28 +00:00
|
|
|
maintainers = with maintainers; [ havvy Frostman ];
|
2018-02-23 10:22:30 +00:00
|
|
|
};
|
|
|
|
}
|