mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
Merge pull request #20916 from montag451/corosync
corosync: 2.4.1 -> 2.4.2
This commit is contained in:
commit
0df00d66d5
@ -46,6 +46,20 @@ in stdenv.mkDerivation rec {
|
|||||||
make -j$NIX_BUILD_CORES
|
make -j$NIX_BUILD_CORES
|
||||||
make install
|
make install
|
||||||
done
|
done
|
||||||
|
|
||||||
|
mkdir -p $out/lib/pkgconfig
|
||||||
|
cat >$out/lib/pkgconfig/ibverbs.pc <<EOF
|
||||||
|
prefix=$out
|
||||||
|
exec_prefix=\''${prefix}
|
||||||
|
libdir=\''${exec_prefix}/lib
|
||||||
|
includedir=\''${prefix}/include
|
||||||
|
|
||||||
|
Name: IB verbs
|
||||||
|
Version: ${version}
|
||||||
|
Description: Library for direct userspace use of RDMA (InfiniBand/iWARP)
|
||||||
|
Libs: -L\''${libdir} -libverbs
|
||||||
|
Cflags: -I\''${includedir}
|
||||||
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Re-add the libibverbs path into runpath of the library
|
# Re-add the libibverbs path into runpath of the library
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{ stdenv, fetchurl, libibverbs }:
|
{ stdenv, fetchurl, libibverbs }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "librdmacm-1.0.21";
|
name = "librdmacm-${version}";
|
||||||
|
version = "1.0.21";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.openfabrics.org/downloads/rdmacm/${name}.tar.gz";
|
url = "https://www.openfabrics.org/downloads/rdmacm/${name}.tar.gz";
|
||||||
@ -10,6 +11,22 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ libibverbs ];
|
buildInputs = [ libibverbs ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/lib/pkgconfig
|
||||||
|
cat >$out/lib/pkgconfig/rdmacm.pc <<EOF
|
||||||
|
prefix=$out
|
||||||
|
exec_prefix=\''${prefix}
|
||||||
|
libdir=\''${exec_prefix}/lib
|
||||||
|
includedir=\''${prefix}/include
|
||||||
|
|
||||||
|
Name: RDMA library
|
||||||
|
Version: ${version}
|
||||||
|
Description: Library for managing RDMA connections
|
||||||
|
Libs: -L\''${libdir} -lrdmacm
|
||||||
|
Cflags: -I\''${includedir}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://www.openfabrics.org/;
|
homepage = https://www.openfabrics.org/;
|
||||||
platforms = with platforms; linux ++ freebsd;
|
platforms = with platforms; linux ++ freebsd;
|
||||||
|
@ -1,50 +1,61 @@
|
|||||||
{ stdenv, fetchurl, makeWrapper, pkgconfig, nss, nspr, libqb
|
{ stdenv, fetchurl, makeWrapper, pkgconfig, nss, nspr, libqb
|
||||||
, dbus ? null
|
, dbus, librdmacm, libibverbs, libstatgrab, net_snmp
|
||||||
, librdmacm ? null, libibverbs ? null
|
, enableDbus ? false
|
||||||
, libstatgrab ? null
|
, enableInfiniBandRdma ? false
|
||||||
, net_snmp ? null
|
, enableMonitoring ? false
|
||||||
|
, enableSnmp ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "corosync-2.4.1";
|
name = "corosync-2.4.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://build.clusterlabs.org/corosync/releases/${name}.tar.gz";
|
url = "http://build.clusterlabs.org/corosync/releases/${name}.tar.gz";
|
||||||
sha256 = "0w8m97ih7a2g99pmjsckw4xwbgzv96xdgg62s2a4qbgnw4yl637y";
|
sha256 = "1aab380mv4ivy5icmwvk7941jbs6ikm21p5ijk7brr4z608k0vpj";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
||||||
makeWrapper pkgconfig nss nspr libqb
|
|
||||||
dbus librdmacm libibverbs libstatgrab net_snmp
|
|
||||||
];
|
|
||||||
|
|
||||||
# Remove when rdma libraries gain pkgconfig support
|
buildInputs = [
|
||||||
ibverbs_CFLAGS = optionalString (libibverbs != null)
|
nss nspr libqb
|
||||||
"-I${libibverbs}/include/infiniband";
|
] ++ optional enableDbus dbus
|
||||||
ibverbs_LIBS = optionalString (libibverbs != null) "-libverbs";
|
++ optional enableInfiniBandRdma [ librdmacm libibverbs ]
|
||||||
rdmacm_CFLAGS = optionalString (librdmacm != null)
|
++ optional enableMonitoring libstatgrab
|
||||||
"-I${librdmacm}/include/rdma";
|
++ optional enableSnmp net_snmp;
|
||||||
rdmacm_LIBS = optionalString (librdmacm != null) "-lrdmacm";
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
"--sysconfdir=/etc"
|
||||||
|
"--localstatedir=/var"
|
||||||
|
"--with-logdir=/var/log/corosync"
|
||||||
"--enable-watchdog"
|
"--enable-watchdog"
|
||||||
"--enable-qdevices"
|
"--enable-qdevices"
|
||||||
] ++ optional (dbus != null) "--enable-dbus"
|
] ++ optional enableDbus "--enable-dbus"
|
||||||
++ optional (librdmacm != null && libibverbs != null) "--enable-rdma"
|
++ optional enableInfiniBandRdma "--enable-rdma"
|
||||||
++ optional (libstatgrab != null) "--enable-monitoring"
|
++ optional enableMonitoring "--enable-monitoring"
|
||||||
++ optional (net_snmp != null) "--enable-snmp";
|
++ 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"
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/corosync-blackbox \
|
wrapProgram $out/bin/corosync-blackbox \
|
||||||
--prefix PATH ":" "$out/sbin:${libqb}/sbin"
|
--prefix PATH ":" "$out/sbin:${libqb}/sbin"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://corosync.org/;
|
homepage = http://corosync.org/;
|
||||||
description = "A Group Communication System with features for implementing high availability within applications";
|
description = "A Group Communication System with features for implementing high availability within applications";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ wkennington ];
|
maintainers = with maintainers; [ wkennington montag451 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user