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

42 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, pkg-config
2015-04-06 19:22:53 +01:00
, 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 {
2017-04-23 21:45:29 +01:00
name = "ucommon-7.0.0";
src = fetchurl {
url = "mirror://gnu/commoncpp/${name}.tar.gz";
2017-04-23 21:45:29 +01:00
sha256 = "6ac9f76c2af010f97e916e4bae1cece341dc64ca28e3881ff4ddc3bc334060d7";
};
nativeBuildInputs = [ pkg-config ];
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 ];
doCheck = true;
meta = {
description = "C++ library to facilitate using C++ design patterns";
homepage = "https://www.gnu.org/software/commoncpp/";
license = lib.licenses.lgpl3Plus;
maintainers = with lib.maintainers; [ ];
platforms = lib.platforms.linux;
};
}