summary refs log tree commit diff
path: root/pkgs/servers/amqp/qpid-cpp/default.nix
blob: 02c2e03d90fad1ff1576f7bdc32b8499970e2cdf (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ stdenv, fetchurl, cmake, python2, boost, libuuid, ruby, buildEnv, buildPythonPackage, qpid-python }:

let
  name = "qpid-cpp-${version}";
  version = "1.39.0";

  src = fetchurl {
    url = "mirror://apache/qpid/cpp/${version}/${name}.tar.gz";
    sha256 = "088dx1l6myrksbhpr15bs09j6qm8vdliqwjp2ja5amym47md103r";
  };

  meta = with stdenv.lib; {
    homepage = http://qpid.apache.org;
    repositories.git = git://git.apache.org/qpid.git;
    repositories.svn = http://svn.apache.org/repos/asf/qpid;
    description = "An AMQP message broker and a C++ messaging API";
    license = licenses.asl20;
    platforms = platforms.linux;
    maintainers = with maintainers; [ cpages ];
  };

  qpid-cpp = stdenv.mkDerivation {
    inherit src meta name;

    nativeBuildInputs = [ cmake ];
    buildInputs = [ boost libuuid ruby python2 ];

    # the subdir managementgen wants to install python stuff in ${python} and
    # the installation tries to create some folders in /var
    postPatch = ''
      sed -i '/managementgen/d' CMakeLists.txt
      sed -i '/ENV/d' src/CMakeLists.txt
      sed -i '/management/d' CMakeLists.txt
    '';

    NIX_CFLAGS_COMPILE = toString ([
      "-Wno-error=deprecated-declarations"
      "-Wno-error=int-in-bool-context"
      "-Wno-error=maybe-uninitialized"
      "-Wno-error=unused-function"
      "-Wno-error=ignored-qualifiers"
      "-Wno-error=catch-value"
    ] ++ stdenv.lib.optionals stdenv.cc.isGNU [
      "-Wno-error=deprecated-copy"
    ]);
  };

  python-frontend = buildPythonPackage {
    inherit name meta src;

    sourceRoot = "${name}/management/python";

    propagatedBuildInputs = [ qpid-python ];
  };
in buildEnv {
  name = "${name}-env";
  paths = [ qpid-cpp python-frontend ];
}