2022-07-18 16:21:45 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, nix, rustPlatform, CoreServices }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.4.35";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-08 23:34:03 +00:00
|
|
|
owner = "rust-lang";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "mdBook";
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
sha256 = "sha256-oplR34M2PbcIwrfIkA4Ttk2zt3ve883TfXGIDnfJt/4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
cargoHash = "sha256-D0XhrweO0A1+81Je4JZ0lmnbIHstNvefpmogCyB4FEE=";
|
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
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
passthru = {
|
|
|
|
tests = {
|
|
|
|
inherit nix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Create books from MarkDown";
|
2021-08-08 23:34:03 +00:00
|
|
|
homepage = "https://github.com/rust-lang/mdBook";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/rust-lang/mdBook/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = [ licenses.mpl20 ];
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ havvy Frostman matthiasbeyer ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|