corosync: 2.4.1 -> 2.4.2 + various improvements

+33 -22
+33 -22
pkgs/servers/corosync/default.nix
··· 1 1 { stdenv, fetchurl, makeWrapper, pkgconfig, nss, nspr, libqb 2 - , dbus ? null 3 - , librdmacm ? null, libibverbs ? null 4 - , libstatgrab ? null 5 - , net_snmp ? null 2 + , dbus, librdmacm, libibverbs, libstatgrab, net_snmp 3 + , enableDbus ? false 4 + , enableInfiniBandRdma ? false 5 + , enableMonitoring ? false 6 + , enableSnmp ? false 6 7 }: 7 8 8 9 with stdenv.lib; 10 + 9 11 stdenv.mkDerivation rec { 10 - name = "corosync-2.4.1"; 12 + name = "corosync-2.4.2"; 11 13 12 14 src = fetchurl { 13 15 url = "http://build.clusterlabs.org/corosync/releases/${name}.tar.gz"; 14 - sha256 = "0w8m97ih7a2g99pmjsckw4xwbgzv96xdgg62s2a4qbgnw4yl637y"; 16 + sha256 = "1aab380mv4ivy5icmwvk7941jbs6ikm21p5ijk7brr4z608k0vpj"; 15 17 }; 16 18 19 + nativeBuildInputs = [ makeWrapper pkgconfig ]; 20 + 17 21 buildInputs = [ 18 - makeWrapper pkgconfig nss nspr libqb 19 - dbus librdmacm libibverbs libstatgrab net_snmp 20 - ]; 21 - 22 - # Remove when rdma libraries gain pkgconfig support 23 - ibverbs_CFLAGS = optionalString (libibverbs != null) 24 - "-I${libibverbs}/include/infiniband"; 25 - ibverbs_LIBS = optionalString (libibverbs != null) "-libverbs"; 26 - rdmacm_CFLAGS = optionalString (librdmacm != null) 27 - "-I${librdmacm}/include/rdma"; 28 - rdmacm_LIBS = optionalString (librdmacm != null) "-lrdmacm"; 22 + nss nspr libqb 23 + ] ++ optional enableDbus dbus 24 + ++ optional enableInfiniBandRdma [ librdmacm libibverbs ] 25 + ++ optional enableMonitoring libstatgrab 26 + ++ optional enableSnmp net_snmp; 29 27 30 28 configureFlags = [ 29 + "--sysconfdir=/etc" 30 + "--localstatedir=/var" 31 + "--with-logdir=/var/log/corosync" 31 32 "--enable-watchdog" 32 33 "--enable-qdevices" 33 - ] ++ optional (dbus != null) "--enable-dbus" 34 - ++ optional (librdmacm != null && libibverbs != null) "--enable-rdma" 35 - ++ optional (libstatgrab != null) "--enable-monitoring" 36 - ++ optional (net_snmp != null) "--enable-snmp"; 34 + ] ++ optional enableDbus "--enable-dbus" 35 + ++ optional enableInfiniBandRdma "--enable-rdma" 36 + ++ optional enableMonitoring "--enable-monitoring" 37 + ++ optional enableSnmp "--enable-snmp"; 38 + 39 + installFlags = [ 40 + "sysconfdir=$(out)/etc" 41 + "localstatedir=$(out)/var" 42 + "COROSYSCONFDIR=$(out)/etc/corosync" 43 + "INITDDIR=$(out)/etc/init.d" 44 + "LOGROTATEDIR=$(out)/etc/logrotate.d" 45 + ]; 37 46 38 47 postInstall = '' 39 48 wrapProgram $out/bin/corosync-blackbox \ 40 49 --prefix PATH ":" "$out/sbin:${libqb}/sbin" 41 50 ''; 42 51 52 + enableParallelBuilding = true; 53 + 43 54 meta = { 44 55 homepage = http://corosync.org/; 45 56 description = "A Group Communication System with features for implementing high availability within applications"; 46 57 license = licenses.bsd3; 47 58 platforms = platforms.linux; 48 - maintainers = with maintainers; [ wkennington ]; 59 + maintainers = with maintainers; [ wkennington montag451 ]; 49 60 }; 50 61 }