lol
1{ stdenv, fetchurl, gperf, pkgconfig, librevenge, libxml2, boost, icu
2, cppunit, zlib
3}:
4
5let
6 s = # Generated upstream information
7 rec {
8 baseName="libe-book";
9 version="0.1.2";
10 name="${baseName}-${version}";
11 hash="1v48pd32r2pfysr3a3igc4ivcf6vvb26jq4pdkcnq75p70alp2bz";
12 url="mirror://sourceforge/project/libebook/libe-book-0.1.2/libe-book-0.1.2.tar.xz";
13 sha256="1v48pd32r2pfysr3a3igc4ivcf6vvb26jq4pdkcnq75p70alp2bz";
14 };
15
16 nativeBuildInputs = [ pkgconfig ];
17 buildInputs = [
18 gperf librevenge libxml2 boost icu cppunit zlib
19 ];
20
21 # Boost 1.59 compatability fix
22 # Attempt removing when updating
23 postPatch = ''
24 sed -i 's,^CPPFLAGS.*,\0 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED,' src/lib/Makefile.in
25 '';
26in
27stdenv.mkDerivation {
28 inherit (s) name version;
29 inherit nativeBuildInputs buildInputs postPatch;
30 src = fetchurl {
31 inherit (s) url sha256;
32 };
33 NIX_CFLAGS_COMPILE = "-Wno-error=unused-function";
34 meta = {
35 inherit (s) version;
36 description = ''Library for import of reflowable e-book formats'';
37 license = stdenv.lib.licenses.lgpl21Plus ;
38 maintainers = [stdenv.lib.maintainers.raskin];
39 platforms = stdenv.lib.platforms.linux;
40 };
41}