about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/ucommon/default.nix
blob: 09e6e2d6a03cabaedcf050243db34fd67287f580 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ lib, stdenv, fetchurl, pkg-config
, gnutls
}:

stdenv.mkDerivation rec {
  pname = "ucommon";
  version = "7.0.0";

  src = fetchurl {
    url = "mirror://gnu/commoncpp/${pname}-${version}.tar.gz";
    sha256 = "6ac9f76c2af010f97e916e4bae1cece341dc64ca28e3881ff4ddc3bc334060d7";
  };

  nativeBuildInputs = [ pkg-config ];

  # use C++14 Standard until error handling code gets updated upstream
  CXXFLAGS = [ "-std=c++14" ];

  # disable flaky networking test
  postPatch = ''
    substituteInPlace test/stream.cpp \
      --replace 'ifndef UCOMMON_SYSRUNTIME' 'if 0'
  '';

  # ucommon.pc has link time depdendencies on -lusecure -lucommon -lgnutls
  propagatedBuildInputs = [ 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;
  };
}