nixpkgs/pkgs/tools/text/mdbook/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
966 B
Nix
Raw Normal View History

2022-07-16 01:45:46 +01:00
{ lib, stdenv, fetchFromGitHub, nix, rustPlatform, CoreServices }:
rustPlatform.buildRustPackage rec {
2019-08-31 12:41:23 +01:00
pname = "mdbook";
2022-07-24 16:55:48 +01:00
version = "0.4.21";
src = fetchFromGitHub {
2021-08-08 08:03:03 +01:00
owner = "rust-lang";
repo = "mdBook";
2018-07-14 19:33:02 +01:00
rev = "v${version}";
2022-07-24 16:55:48 +01:00
sha256 = "sha256-ggcyOsA4cyo5l87cZmOMI0w1gCzmWy9NRJiWxjBdB1E=";
};
2022-07-24 16:55:48 +01:00
cargoSha256 = "sha256-KVoMC8ypikABVkIj5dCSHzYZ9CV8UMuAFxSEYLaQTSk=";
2021-01-15 09:19:50 +00:00
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
# 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";
2022-07-16 01:45:46 +01:00
passthru = {
tests = {
inherit nix;
};
};
meta = with lib; {
description = "Create books from MarkDown";
2021-08-08 08:03:03 +01:00
homepage = "https://github.com/rust-lang/mdBook";
license = [ licenses.mpl20 ];
maintainers = [ maintainers.havvy ];
};
}