2023-02-02 18:25:31 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, bzip2
|
|
|
|
, CoreServices
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "mdbook-epub";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.4.37";
|
2023-02-02 18:25:31 +00:00
|
|
|
in rustPlatform.buildRustPackage {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "michael-f-bryan";
|
|
|
|
repo = pname;
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-ddWClkeGabvqteVUtuwy4pWZGnarrKrIbuPEe62m6es=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
cargoHash = "sha256-cJS9HgbnLYXkZrAyGNEeu6q+znH+7cj8CUGIbTCbB9Y=";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
bzip2
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
CoreServices
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "mdbook backend for generating an e-book in the EPUB format";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "mdbook-epub";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://michael-f-bryan.github.io/mdbook-epub";
|
|
|
|
license = licenses.mpl20;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ yuu matthiasbeyer ];
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
}
|