2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchCrate
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustfmt
|
2023-01-11 07:51:40 +00:00
|
|
|
, openssl
|
|
|
|
, CoreServices
|
|
|
|
}:
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook-pdf";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.1.7";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-3hyvLLBcS7MLAL707tkvW8LGue/x9DudOYhJDDqAdRg=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
cargoHash = "sha256-ecIaKSrkqUsQWchkm9uCTXLuQabzGmEz1UqDR13vX8Y=";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2023-05-24 13:37:59 +00:00
|
|
|
rustfmt
|
2023-01-11 07:51:40 +00:00
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
CoreServices
|
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# Stop downloading from the Internet to
|
|
|
|
# generate the Chrome Devtools Protocol
|
|
|
|
DOCS_RS=true;
|
|
|
|
|
|
|
|
# # Stop formating with rustfmt, pending version update for
|
|
|
|
# # https://github.com/mdrokz/auto_generate_cdp/pull/8
|
|
|
|
# # to remove rustfmt dependency
|
|
|
|
# DO_NOT_FORMAT=true;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
# No test.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A backend for mdBook written in Rust for generating PDF";
|
2023-01-11 07:51:40 +00:00
|
|
|
homepage = "https://github.com/HollowMan6/mdbook-pdf";
|
|
|
|
changelog = "https://github.com/HollowMan6/mdbook-pdf/releases/tag/v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ hollowman6 ];
|
|
|
|
};
|
|
|
|
}
|