1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 gnutls,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "ucommon";
11 version = "7.0.0";
12
13 src = fetchurl {
14 url = "mirror://gnu/commoncpp/${pname}-${version}.tar.gz";
15 sha256 = "6ac9f76c2af010f97e916e4bae1cece341dc64ca28e3881ff4ddc3bc334060d7";
16 };
17
18 nativeBuildInputs = [ pkg-config ];
19
20 # use C++14 Standard until error handling code gets updated upstream
21 CXXFLAGS = [ "-std=c++14" ];
22
23 # disable flaky networking test
24 postPatch = ''
25 substituteInPlace test/stream.cpp \
26 --replace 'ifndef UCOMMON_SYSRUNTIME' 'if 0'
27 '';
28
29 # ucommon.pc has link time dependencies on -lusecure -lucommon -lgnutls
30 propagatedBuildInputs = [ gnutls ];
31
32 doCheck = true;
33
34 meta = {
35 description = "C++ library to facilitate using C++ design patterns";
36 homepage = "https://www.gnu.org/software/commoncpp/";
37 license = lib.licenses.lgpl3Plus;
38 maintainers = [ ];
39 platforms = lib.platforms.linux;
40 };
41}