forked from mirrors/nixpkgs
9bb3fccb5b
continuation of #109595 pkgconfig was aliased in 2018, however, it remained in all-packages.nix due to its wide usage. This cleans up the remaining references to pkgs.pkgsconfig and moves the entry to aliases.nix. python3Packages.pkgconfig remained unchanged because it's the canonical name of the upstream package on pypi.
42 lines
1 KiB
Nix
42 lines
1 KiB
Nix
{ stdenv, fetchurl, pkg-config
|
|
, 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 {
|
|
name = "ucommon-7.0.0";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/commoncpp/${name}.tar.gz";
|
|
sha256 = "6ac9f76c2af010f97e916e4bae1cece341dc64ca28e3881ff4ddc3bc334060d7";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
# disable flaky networking test
|
|
postPatch = ''
|
|
substituteInPlace test/stream.cpp \
|
|
--replace 'ifndef UCOMMON_SYSRUNTIME' 'if 0'
|
|
'';
|
|
|
|
# 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 = stdenv.lib.licenses.lgpl3Plus;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ ];
|
|
platforms = stdenv.lib.platforms.linux;
|
|
};
|
|
}
|