2023-01-10 15:17:03 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchCrate
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, CoreServices
|
|
|
|
}:
|
2022-03-24 07:24:42 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook-pdf";
|
2024-08-06 07:52:45 +00:00
|
|
|
version = "0.1.10";
|
2022-03-24 07:24:42 +00:00
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2024-08-06 07:52:45 +00:00
|
|
|
hash = "sha256-zRoO84ij7zF1I8ijXS/oApMKfS3e04+5/CgahAemqCA=";
|
2022-03-24 07:24:42 +00:00
|
|
|
};
|
|
|
|
|
2024-08-06 07:52:45 +00:00
|
|
|
cargoHash = "sha256-eay3tl4edeM05D+0iIu8Zw4L1N2Bk1csLo0AwNdyCdA=";
|
2022-03-24 07:24:42 +00:00
|
|
|
|
2023-01-10 15:17:03 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-03-24 07:24:42 +00:00
|
|
|
|
2023-01-10 15:17:03 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
CoreServices
|
|
|
|
];
|
2022-03-24 07:24:42 +00:00
|
|
|
|
2023-05-20 08:00:38 +00:00
|
|
|
# Stop downloading from the Internet to
|
|
|
|
# generate the Chrome Devtools Protocol
|
2024-08-06 07:52:45 +00:00
|
|
|
env.DOCS_RS = true;
|
2023-05-20 08:00:38 +00:00
|
|
|
|
2024-08-06 07:52:45 +00:00
|
|
|
# Stop formatting with rustfmt
|
|
|
|
env.DO_NOT_FORMAT = true;
|
2023-05-20 08:00:38 +00:00
|
|
|
|
2022-03-24 07:24:42 +00:00
|
|
|
# No test.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Backend for mdBook written in Rust for generating PDF";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "mdbook-pdf";
|
2023-01-10 15:17:03 +00:00
|
|
|
homepage = "https://github.com/HollowMan6/mdbook-pdf";
|
|
|
|
changelog = "https://github.com/HollowMan6/mdbook-pdf/releases/tag/v${version}";
|
2022-03-24 07:24:42 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2024-04-17 18:58:31 +00:00
|
|
|
maintainers = with maintainers; [ hollowman6 matthiasbeyer ];
|
2022-03-24 07:24:42 +00:00
|
|
|
};
|
|
|
|
}
|