Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchpatch,
5 fetchurl,
6 boost183,
7 cmake,
8 libuuid,
9 python3,
10 ruby,
11}:
12
13stdenv.mkDerivation rec {
14 pname = "qpid-cpp";
15 version = "1.39.0";
16
17 src = fetchurl {
18 url = "mirror://apache/qpid/cpp/${version}/${pname}-${version}.tar.gz";
19 hash = "sha256-eYDQ6iHVV1WUFFdyHGnbqGIjE9CrhHzh0jP7amjoDSE=";
20 };
21
22 nativeBuildInputs = [
23 cmake
24 python3
25 ];
26 buildInputs = [
27 boost183
28 libuuid
29 ruby
30 ];
31
32 patches = [
33 (fetchpatch {
34 name = "python3-managementgen";
35 url = "https://github.com/apache/qpid-cpp/commit/0e558866e90ef3d5becbd2f6d5630a6a6dc43a5d.patch";
36 hash = "sha256-pV6xx8Nrys/ZxIO0Z/fARH0ELqcSdTXLPsVXYUd3f70=";
37 })
38 ];
39
40 # the subdir managementgen wants to install python stuff in ${python} and
41 # the installation tries to create some folders in /var
42 postPatch = ''
43 sed -i '/managementgen/d' CMakeLists.txt
44 sed -i '/ENV/d' src/CMakeLists.txt
45 sed -i '/management/d' CMakeLists.txt
46 '';
47
48 env.NIX_CFLAGS_COMPILE = toString (
49 [
50 "-Wno-error=maybe-uninitialized"
51 ]
52 ++ lib.optionals stdenv.cc.isGNU [
53 "-Wno-error=deprecated-copy"
54 ]
55 );
56
57 meta = with lib; {
58 homepage = "https://qpid.apache.org";
59 description = "AMQP message broker and a C++ messaging API";
60 license = licenses.asl20;
61 platforms = platforms.linux;
62 maintainers = [ ];
63 };
64}