1{
2 lib,
3 stdenv,
4 fetchurl,
5 gperf,
6 pkg-config,
7 librevenge,
8 libxml2,
9 boost,
10 icu,
11 cppunit,
12 zlib,
13 liblangtag,
14}:
15
16stdenv.mkDerivation (finalAttrs: {
17 pname = "libe-book";
18 version = "0.1.3";
19
20 src = fetchurl {
21 url = "mirror://sourceforge/libebook/libe-book-${finalAttrs.version}/libe-book-${finalAttrs.version}.tar.xz";
22 hash = "sha256-fo2P808ngxrKO8b5zFMsL5DSBXx3iWO4hP89HjTf4fk=";
23 };
24
25 # restore compatibility with icu68+
26 # https://sourceforge.net/p/libebook/code/ci/edc7a50a06f56992fe21a80afb4f20fbdc5654ed/
27 postPatch = ''
28 substituteInPlace src/lib/EBOOKCharsetConverter.cpp --replace-fail \
29 "TRUE, TRUE, &status)" \
30 "true, true, &status)"
31 '';
32
33 nativeBuildInputs = [
34 pkg-config
35 gperf
36 ];
37
38 buildInputs = [
39 librevenge
40 libxml2
41 boost
42 icu
43 cppunit
44 zlib
45 liblangtag
46 ];
47
48 strictDeps = true;
49
50 enableParallelBuilding = true;
51
52 meta = {
53 description = "Library for import of reflowable e-book formats";
54 license = lib.licenses.lgpl21Plus;
55 maintainers = with lib.maintainers; [ raskin ];
56 platforms = lib.platforms.unix;
57 };
58})