nixpkgs/pkgs/development/libraries/ucommon/default.nix

42 lines
1.0 KiB
Nix
Raw Normal View History

2015-04-06 18:22:53 +00: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));
stdenv.mkDerivation rec {
2015-04-06 18:22:53 +00:00
name = "ucommon-6.3.1";
src = fetchurl {
url = "mirror://gnu/commoncpp/${name}.tar.gz";
2015-04-06 18:22:53 +00:00
sha256 = "1marbwbqnllhm9nh22lvyfjy802pgy1wx7j7kkpkasbm9r0sb6mm";
};
2015-04-06 18:22:53 +00:00
buildInputs = [ pkgconfig ];
2016-08-29 01:31:47 +00:00
# disable flaky networking test
postPatch = ''
substituteInPlace test/stream.cpp \
--replace 'ifndef UCOMMON_SYSRUNTIME' 'if 0'
'';
2015-04-06 18:22:53 +00:00
# ucommon.pc has link time depdendencies on -lssl, -lcrypto, -lz, -lgnutls
propagatedBuildInputs = [ openssl zlib gnutls ];
doCheck = true;
meta = {
description = "C++ library to facilitate using C++ design patterns";
homepage = http://www.gnu.org/software/commoncpp/;
license = stdenv.lib.licenses.lgpl3Plus;
2013-08-16 21:44:33 +00:00
maintainers = with stdenv.lib.maintainers; [ viric ];
platforms = stdenv.lib.platforms.all;
};
}