2015-04-06 19:22:53 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig
|
|
|
|
, openssl ? null, zlib ? null, gnutls ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
xor = a: b: (a || b) && (!(a && b));
|
|
|
|
in
|
|
|
|
|
|
|
|
assert xor (openssl != null) (gnutls != null);
|
|
|
|
assert !(xor (openssl != null) (zlib != null));
|
2011-01-19 21:17:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-04-23 21:45:29 +01:00
|
|
|
name = "ucommon-7.0.0";
|
2011-01-19 21:17:05 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-10-18 13:46:11 +01:00
|
|
|
url = "mirror://gnu/commoncpp/${name}.tar.gz";
|
2017-04-23 21:45:29 +01:00
|
|
|
sha256 = "6ac9f76c2af010f97e916e4bae1cece341dc64ca28e3881ff4ddc3bc334060d7";
|
2011-01-19 21:17:05 +00:00
|
|
|
};
|
|
|
|
|
2017-09-05 22:25:26 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2011-01-19 21:17:05 +00:00
|
|
|
|
2016-08-29 02:31:47 +01:00
|
|
|
# disable flaky networking test
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace test/stream.cpp \
|
|
|
|
--replace 'ifndef UCOMMON_SYSRUNTIME' 'if 0'
|
|
|
|
'';
|
|
|
|
|
2015-04-06 19:22:53 +01:00
|
|
|
# ucommon.pc has link time depdendencies on -lssl, -lcrypto, -lz, -lgnutls
|
|
|
|
propagatedBuildInputs = [ openssl zlib gnutls ];
|
2011-04-12 09:05:35 +01:00
|
|
|
|
2011-01-19 21:17:05 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "C++ library to facilitate using C++ design patterns";
|
2018-12-01 18:22:13 +00:00
|
|
|
homepage = https://www.gnu.org/software/commoncpp/;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl3Plus;
|
2011-01-19 21:17:05 +00:00
|
|
|
|
2018-07-22 20:50:19 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ ];
|
2016-09-01 18:39:33 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2011-01-19 21:17:05 +00:00
|
|
|
};
|
|
|
|
}
|