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

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

50 lines
1.1 KiB
Nix
Raw Normal View History

2023-01-10 15:17:03 +00:00
{ lib
, stdenv
, fetchCrate
, rustPlatform
, pkg-config
, openssl
, CoreServices
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-pdf";
version = "0.1.10";
src = fetchCrate {
inherit pname version;
hash = "sha256-zRoO84ij7zF1I8ijXS/oApMKfS3e04+5/CgahAemqCA=";
};
cargoHash = "sha256-eay3tl4edeM05D+0iIu8Zw4L1N2Bk1csLo0AwNdyCdA=";
2023-01-10 15:17:03 +00:00
nativeBuildInputs = [
pkg-config
];
2023-01-10 15:17:03 +00:00
buildInputs = [
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
CoreServices
];
# Stop downloading from the Internet to
# generate the Chrome Devtools Protocol
env.DOCS_RS = true;
# Stop formatting with rustfmt
env.DO_NOT_FORMAT = true;
# No test.
doCheck = false;
meta = with lib; {
description = "Backend for mdBook written in Rust for generating PDF";
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}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ hollowman6 matthiasbeyer ];
};
}