2014-10-08 09:38:14 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, pkgconfig, nss, nspr, libqb
|
2016-11-28 07:15:56 +00:00
|
|
|
, dbus, librdmacm, libibverbs, libstatgrab, net_snmp
|
|
|
|
, enableDbus ? false
|
|
|
|
, enableInfiniBandRdma ? false
|
|
|
|
, enableMonitoring ? false
|
|
|
|
, enableSnmp ? false
|
2014-10-08 09:38:14 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2016-11-28 07:15:56 +00:00
|
|
|
|
2014-10-08 09:38:14 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-02-26 01:41:52 +00:00
|
|
|
name = "corosync-2.4.3";
|
2014-10-08 09:38:14 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://build.clusterlabs.org/corosync/releases/${name}.tar.gz";
|
2018-02-26 01:41:52 +00:00
|
|
|
sha256 = "15y5la04qn2lh1gabyifygzpa4dx3ndk5yhmaf7azxyjx0if9rxi";
|
2014-10-08 09:38:14 +01:00
|
|
|
};
|
|
|
|
|
2016-11-28 07:15:56 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
2014-10-08 09:38:14 +01:00
|
|
|
|
2016-11-28 07:15:56 +00:00
|
|
|
buildInputs = [
|
|
|
|
nss nspr libqb
|
|
|
|
] ++ optional enableDbus dbus
|
|
|
|
++ optional enableInfiniBandRdma [ librdmacm libibverbs ]
|
|
|
|
++ optional enableMonitoring libstatgrab
|
|
|
|
++ optional enableSnmp net_snmp;
|
2014-10-08 09:38:14 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
2016-11-28 07:15:56 +00:00
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-logdir=/var/log/corosync"
|
2014-10-08 09:38:14 +01:00
|
|
|
"--enable-watchdog"
|
|
|
|
"--enable-qdevices"
|
2016-11-28 07:15:56 +00:00
|
|
|
] ++ 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"
|
|
|
|
];
|
2014-10-08 09:38:14 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/corosync-blackbox \
|
|
|
|
--prefix PATH ":" "$out/sbin:${libqb}/sbin"
|
|
|
|
'';
|
|
|
|
|
2016-11-28 07:15:56 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-10-08 09:38:14 +01:00
|
|
|
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 09:38:14 +01:00
|
|
|
license = licenses.bsd3;
|
2015-04-04 07:23:42 +01:00
|
|
|
platforms = platforms.linux;
|
2016-11-28 07:15:56 +00:00
|
|
|
maintainers = with maintainers; [ wkennington montag451 ];
|
2014-10-08 09:38:14 +01:00
|
|
|
};
|
|
|
|
}
|