nixpkgs/pkgs/tools/text/mdbook/default.nix
2021-08-08 10:03:03 +03:00

25 lines
655 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
rustPlatform.buildRustPackage rec {
pname = "mdbook";
version = "0.4.12";
src = fetchFromGitHub {
owner = "rust-lang";
repo = "mdBook";
rev = "v${version}";
sha256 = "sha256-2lxotwL3Dc9jRA12iKO5zotO80pa+RfUZucyDRgFOsI=";
};
cargoSha256 = "sha256-TNd4pj4qSKgmmVtSCSKFCxNtv96xD7+24BPsLXPgiEI=";
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
meta = with lib; {
description = "Create books from MarkDown";
homepage = "https://github.com/rust-lang/mdBook";
license = [ licenses.mpl20 ];
maintainers = [ maintainers.havvy ];
};
}