nixpkgs/pkgs/servers/amqp/qpid-cpp/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

60 lines
1.7 KiB
Nix

{ lib, stdenv, fetchurl, cmake, python2, boost, libuuid, ruby, buildEnv, buildPythonPackage, qpid-python }:
let
pname = "qpid-cpp";
name = "${pname}-${version}";
version = "1.39.0";
src = fetchurl {
url = "mirror://apache/qpid/cpp/${version}/${name}.tar.gz";
sha256 = "088dx1l6myrksbhpr15bs09j6qm8vdliqwjp2ja5amym47md103r";
};
meta = with 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 pname version;
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 pname version meta src;
sourceRoot = "${name}/management/python";
propagatedBuildInputs = [ qpid-python ];
};
in buildEnv {
name = "${name}-env";
paths = [ qpid-cpp python-frontend ];
}