Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / rabbitmq-c / default.nix
bloba500e5dbc045cb36ebb90cb104446bbc117aa7a5
1 { lib, stdenv, fetchFromGitHub, cmake, openssl, popt, xmlto }:
3 stdenv.mkDerivation rec {
4   pname = "rabbitmq-c";
5   version = "0.13.0";
7   src = fetchFromGitHub {
8     owner = "alanxz";
9     repo = "rabbitmq-c";
10     rev = "v${version}";
11     sha256 = "sha256-4tSZ+eaLZAkSmFsGnIrRXNvn3xA/4sTKyYZ3hPUMcd0=";
12   };
14   nativeBuildInputs = [ cmake ];
15   buildInputs = [ openssl popt xmlto ];
17   # https://github.com/alanxz/rabbitmq-c/issues/733
18   postPatch = ''
19     substituteInPlace CMakeLists.txt \
20       --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
21       --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
22   '';
24   meta = with lib; {
25     description = "RabbitMQ C AMQP client library";
26     homepage = "https://github.com/alanxz/rabbitmq-c";
27     license = licenses.mit;
28     platforms = platforms.unix;
29   };