1{lib, stdenv, fetchurl, boost, pkg-config, cppunit, zlib}:
2let
3 s = # Generated upstream information
4 rec {
5 baseName="librevenge";
6 version="0.0.4";
7 name="${baseName}-${version}";
8 hash="1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk";
9 url="mirror://sourceforge/project/libwpd/librevenge/librevenge-0.0.4/librevenge-0.0.4.tar.xz";
10 sha256="1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk";
11 };
12 nativeBuildInputs = [ pkg-config ];
13 buildInputs = [
14 boost cppunit zlib
15 ];
16in
17stdenv.mkDerivation {
18 inherit (s) name version;
19 inherit nativeBuildInputs buildInputs;
20 src = fetchurl {
21 inherit (s) url sha256;
22 };
23
24 # Clang and gcc-7 generate warnings, and
25 # -Werror causes these warnings to be interpreted as errors
26 # Simplest solution: disable -Werror
27 configureFlags = [ "--disable-werror" ];
28
29 # Fix an issue with boost 1.59
30 # This is fixed upstream so please remove this when updating
31 postPatch = ''
32 sed -i 's,-DLIBREVENGE_BUILD,\0 -DBOOST_ERROR_CODE_HEADER_ONLY,g' src/lib/Makefile.in
33 '';
34
35 meta = {
36 inherit (s) version;
37 description = "A base library for writing document import filters";
38 license = lib.licenses.mpl20 ;
39 maintainers = [lib.maintainers.raskin];
40 platforms = lib.platforms.unix;
41 };
42}