2023-01-10 16:17:03 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchCrate
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
2023-05-20 10:00:38 +02:00
|
|
|
, rustfmt
|
2023-01-10 16:17:03 +01:00
|
|
|
, openssl
|
|
|
|
, CoreServices
|
|
|
|
}:
|
2022-03-24 08:24:42 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook-pdf";
|
2024-02-02 12:42:08 +01:00
|
|
|
version = "0.1.8";
|
2022-03-24 08:24:42 +01:00
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2024-02-02 12:42:08 +01:00
|
|
|
hash = "sha256-UPSh0/8HFaLvnU95Gyd+uQaRvWeXlp+HViVUKX0I1jI=";
|
2022-03-24 08:24:42 +01:00
|
|
|
};
|
|
|
|
|
2024-02-02 12:42:08 +01:00
|
|
|
cargoHash = "sha256-WYG2EkfEqjOOelxwivk5srtTNLxEPGX1ztwntvgft1I=";
|
2022-03-24 08:24:42 +01:00
|
|
|
|
2023-01-10 16:17:03 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2023-05-20 10:00:38 +02:00
|
|
|
rustfmt
|
2023-01-10 16:17:03 +01:00
|
|
|
];
|
2022-03-24 08:24:42 +01:00
|
|
|
|
2023-01-10 16:17:03 +01:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
CoreServices
|
|
|
|
];
|
2022-03-24 08:24:42 +01:00
|
|
|
|
2023-05-20 10:00:38 +02: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-24 08:24:42 +01:00
|
|
|
# No test.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A backend for mdBook written in Rust for generating PDF";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "mdbook-pdf";
|
2023-01-10 16:17:03 +01:00
|
|
|
homepage = "https://github.com/HollowMan6/mdbook-pdf";
|
|
|
|
changelog = "https://github.com/HollowMan6/mdbook-pdf/releases/tag/v${version}";
|
2022-03-24 08:24:42 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2024-04-17 20:58:31 +02:00
|
|
|
maintainers = with maintainers; [ hollowman6 matthiasbeyer ];
|
2022-03-24 08:24:42 +01:00
|
|
|
};
|
|
|
|
}
|