1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
{ lib, stdenv, fetchurl, makeWrapper, pkg-config, kronosnet, nss, nspr, libqb
, dbus, rdma-core, libstatgrab, net-snmp
, enableDbus ? false
, enableInfiniBandRdma ? false
, enableMonitoring ? false
, enableSnmp ? false
}:
with lib;
stdenv.mkDerivation rec {
pname = "corosync";
version = "3.1.5";
src = fetchurl {
url = "http://build.clusterlabs.org/corosync/releases/${pname}-${version}.tar.gz";
sha256 = "sha256-O7o+PtgasrCAcRsu4kEC+7530GCwXUvi2jEAgghPC7w=";
};
nativeBuildInputs = [ makeWrapper pkg-config ];
buildInputs = [
kronosnet nss nspr libqb
] ++ optional enableDbus dbus
++ optional enableInfiniBandRdma rdma-core
++ optional enableMonitoring libstatgrab
++ optional enableSnmp net-snmp;
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-logdir=/var/log/corosync"
"--enable-watchdog"
"--enable-qdevices"
] ++ optional enableDbus "--enable-dbus"
++ optional enableInfiniBandRdma "--enable-rdma"
++ optional enableMonitoring "--enable-monitoring"
++ optional enableSnmp "--enable-snmp";
installFlags = [
"sysconfdir=$(out)/etc"
"localstatedir=$(out)/var"
"COROSYSCONFDIR=$(out)/etc/corosync"
"INITDDIR=$(out)/etc/init.d"
"LOGROTATEDIR=$(out)/etc/logrotate.d"
];
enableParallelBuilding = true;
preConfigure = optionalString enableInfiniBandRdma ''
# configure looks for the pkg-config files
# of librdmacm and libibverbs
# Howver, rmda-core does not provide a pkg-config file
# We give the flags manually here:
export rdmacm_LIBS=-lrdmacm
export rdmacm_CFLAGS=" "
export ibverbs_LIBS=-libverbs
export ibverbs_CFLAGS=" "
'';
postInstall = ''
wrapProgram $out/bin/corosync-blackbox \
--prefix PATH ":" "$out/sbin:${libqb}/sbin"
'';
meta = {
homepage = "http://corosync.org/";
description = "A Group Communication System with features for implementing high availability within applications";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ montag451 ryantm ];
};
}
|