git.iko.soy/typeable/nixpkgs
on master help sign in
qpid-cpp: fix build

The compilation broke due to the flag `-Werror=int-in-bool-context` which caused several compilation errors with GCC v7. Disabling this warning manually with `-Wno-error` in `NIX_CFLAGS_COMPILE` should be fine. This package experienced several radical changes as the entire python build in `$src/management/python` was broken since the given Python interpreter missed several needed modules (including `pythonPackages.qpid-python`). As the CMake build tried to invoke the affected `setup.py` manually and patched the shebangs with `disutil` and caused non-functional executables, I split the package up into two parts, the actual `qpid-cpp` lib and the Python module that will be composed using `buildEnv`. Furthermore I added myself as maintainer for the package as the diff became quite huge and we should have more folks available to maintain this. See https://hydra.nixos.org/build/71519082/log See tickets #36453 and #31747

commitb71ffc1b25b46297f1e52fd0c0ac491d296160f2 authorMaximilian Bosch <maximilian@mbosch.me> dateFri 23 Mar 2018, 23:56 (9 years ago) parent95a819c
2 files changed+39−18
pkgs/servers/amqp/qpid-cpp/default.nix+38−18 pkgs/top-level/all-packages.nix+1
pkgs/servers/amqp/qpid-cpp/default.nix+38−18
@@ -1,8 +1,7 @@
1−{ stdenv, fetchurl, cmake, python2, boost, libuuid, ruby }:
1+{ stdenv, fetchurl, cmake, python2, boost, libuuid, ruby, buildEnv, buildPythonPackage, qpid-python }:
22
3−stdenv.mkDerivation rec {
3+let
44 name = "qpid-cpp-${version}";
5−
65 version = "1.37.0";
76
87 src = fetchurl {
@@ -10,24 +9,45 @@ stdenv.mkDerivation rec {
109 sha256 = "1s4hyi867i0lqn81c1crrk6fga1gmsv61675vjv5v41skz56lrsb";
1110 };
1211
13− buildInputs = [ cmake python2 boost libuuid ruby ];
14−
15− # the subdir managementgen wants to install python stuff in ${python} and
16− # the installation tries to create some folders in /var
17− patchPhase = ''
18− sed -i '/managementgen/d' CMakeLists.txt
19− sed -i '/ENV/d' src/CMakeLists.txt
20− '';
21−
22− NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=unused-function";
23−
24− meta = {
12+ meta = with stdenv.lib; {
2513 homepage = http://qpid.apache.org;
2614 repositories.git = git://git.apache.org/qpid.git;
2715 repositories.svn = http://svn.apache.org/repos/asf/qpid;
2816 description = "An AMQP message broker and a C++ messaging API";
29− license = stdenv.lib.licenses.asl20;
30− platforms = stdenv.lib.platforms.linux;
31− maintainers = [ stdenv.lib.maintainers.cpages ];
17+ license = licenses.asl20;
18+ platforms = platforms.linux;
19+ maintainers = with maintainers; [ cpages ma27 ];
20+ };
21+
22+ qpid-cpp = stdenv.mkDerivation {
23+ inherit src meta name;
24+
25+ nativeBuildInputs = [ cmake ];
26+ buildInputs = [ boost libuuid ruby python2 ];
27+
28+ # the subdir managementgen wants to install python stuff in ${python} and
29+ # the installation tries to create some folders in /var
30+ postPatch = ''
31+ sed -i '/managementgen/d' CMakeLists.txt
32+ sed -i '/ENV/d' src/CMakeLists.txt
33+ sed -i '/management/d' CMakeLists.txt
34+ '';
35+
36+ NIX_CFLAGS_COMPILE = [
37+ "-Wno-error=deprecated-declarations"
38+ "-Wno-error=unused-function"
39+ "-Wno-error=int-in-bool-context"
40+ ];
41+ };
42+
43+ python-frontend = buildPythonPackage {
44+ inherit name meta src;
45+
46+ sourceRoot = "${name}/management/python";
47+
48+ propagatedBuildInputs = [ qpid-python ];
3249 };
50+in buildEnv {
51+ name = "${name}-env";
52+ paths = [ qpid-cpp python-frontend ];
3353}
pkgs/top-level/all-packages.nix+1
@@ -12716,6 +12716,7 @@ with pkgs;
1271612716
1271712717 qpid-cpp = callPackage ../servers/amqp/qpid-cpp {
1271812718 boost = boost155;
12719+ inherit (pythonPackages) buildPythonPackage qpid-python;
1271912720 };
1272012721
1272112722 quagga = callPackage ../servers/quagga { };