about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gloox/default.nix
blob: 7bf1bfb4bd16b78cdfee54e304e4163fbfe1eccd (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
, zlibSupport ? true, zlib
, sslSupport ? true, openssl
, idnSupport ? true, libidn
}:


stdenv.mkDerivation rec{
  pname = "gloox";
  version = "1.0.28";

  src = fetchurl {
    url = "https://camaya.net/download/gloox-${version}.tar.bz2";
    sha256 = "sha256-WRvRLCSe3gtQoe9rmawN6O+cG6T9Lhhvl6dAIVzFlmw=";
  };

  # needed since gcc12
  postPatch = ''
    sed '1i#include <ctime>' -i \
      src/tests/{tag/tag_perf.cpp,zlib/zlib_perf.cpp} \
      src/examples/*.cpp
  '';

  buildInputs = [ ]
    ++ lib.optional zlibSupport zlib
    ++ lib.optional sslSupport openssl
    ++ lib.optional idnSupport libidn;

  meta = with lib; {
    description = "A portable high-level Jabber/XMPP library for C++";
    mainProgram = "gloox-config";
    homepage = "http://camaya.net/gloox";
    license = licenses.gpl3;
    maintainers = with maintainers; [ ];
    platforms = platforms.unix;
  };
}