about summary refs log tree commit diff
path: root/pkgs/tools/text/mdbook-epub/default.nix
blob: 48dbe92ca6ce3de917ddcab53a78bcd47776be93 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, bzip2
, CoreServices
}:

let
  pname = "mdbook-epub";
  version = "0.4.37";
in rustPlatform.buildRustPackage {
  inherit pname version;

  src = fetchFromGitHub {
    owner = "michael-f-bryan";
    repo = pname;
    rev = version;
    hash = "sha256-ddWClkeGabvqteVUtuwy4pWZGnarrKrIbuPEe62m6es=";
  };

  cargoHash = "sha256-cJS9HgbnLYXkZrAyGNEeu6q+znH+7cj8CUGIbTCbB9Y=";

  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";
    mainProgram = "mdbook-epub";
    homepage = "https://michael-f-bryan.github.io/mdbook-epub";
    license = licenses.mpl20;
    maintainers = with maintainers; [ yuu matthiasbeyer ];
  };
}