nixpkgs/pkgs/servers/corosync/default.nix

51 lines
1.6 KiB
Nix
Raw Normal View History

2014-10-08 08:38:14 +00:00
{ stdenv, fetchurl, makeWrapper, pkgconfig, nss, nspr, libqb
, dbus ? null
, librdmacm ? null, libibverbs ? null
, libstatgrab ? null
, net_snmp ? null
}:
with stdenv.lib;
stdenv.mkDerivation rec {
2016-10-27 00:45:11 +00:00
name = "corosync-2.4.1";
2014-10-08 08:38:14 +00:00
src = fetchurl {
url = "http://build.clusterlabs.org/corosync/releases/${name}.tar.gz";
2016-10-27 00:45:11 +00:00
sha256 = "0w8m97ih7a2g99pmjsckw4xwbgzv96xdgg62s2a4qbgnw4yl637y";
2014-10-08 08:38:14 +00:00
};
buildInputs = [
makeWrapper pkgconfig nss nspr libqb
dbus librdmacm libibverbs libstatgrab net_snmp
];
# Remove when rdma libraries gain pkgconfig support
ibverbs_CFLAGS = optionalString (libibverbs != null)
"-I${libibverbs}/include/infiniband";
ibverbs_LIBS = optionalString (libibverbs != null) "-libverbs";
rdmacm_CFLAGS = optionalString (librdmacm != null)
"-I${librdmacm}/include/rdma";
rdmacm_LIBS = optionalString (librdmacm != null) "-lrdmacm";
configureFlags = [
"--enable-watchdog"
"--enable-qdevices"
] ++ optional (dbus != null) "--enable-dbus"
++ optional (librdmacm != null && libibverbs != null) "--enable-rdma"
++ optional (libstatgrab != null) "--enable-monitoring"
++ optional (net_snmp != null) "--enable-snmp";
postInstall = ''
wrapProgram $out/bin/corosync-blackbox \
--prefix PATH ":" "$out/sbin:${libqb}/sbin"
'';
meta = {
homepage = http://corosync.org/;
2014-11-11 13:20:43 +00:00
description = "A Group Communication System with features for implementing high availability within applications";
2014-10-08 08:38:14 +00:00
license = licenses.bsd3;
2015-04-04 06:23:42 +00:00
platforms = platforms.linux;
2014-10-08 08:38:14 +00:00
maintainers = with maintainers; [ wkennington ];
};
}