2015-06-28 04:59:44 +02:00
|
|
|
{ stdenv, fetchurl, openssl, net_snmp, libnl }:
|
2015-06-27 23:33:21 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-09-18 04:26:25 +02:00
|
|
|
name = "keepalived-1.2.19";
|
2015-06-27 23:33:21 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://keepalived.org/software/${name}.tar.gz";
|
2015-09-18 04:26:25 +02:00
|
|
|
sha256 = "0lrq963pxhgh74qmxjyy5hvxdfpm4r50v4vsrp559n0w5irsxyrj";
|
2015-06-27 23:33:21 +02:00
|
|
|
};
|
|
|
|
|
2015-06-28 04:59:44 +02:00
|
|
|
buildInputs = [ openssl net_snmp libnl ];
|
2015-06-27 23:33:21 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's,$(DESTDIR)/usr/share,$out/share,g' Makefile.in
|
|
|
|
'';
|
|
|
|
|
2015-06-28 04:59:44 +02:00
|
|
|
# It doesn't know about the include/libnl<n> directory
|
2016-04-16 19:37:26 +02:00
|
|
|
NIX_CFLAGS_COMPILE="-I${libnl.dev}/include/libnl3";
|
2015-06-28 04:59:44 +02:00
|
|
|
NIX_LDFLAGS="-lnl-3 -lnl-genl-3";
|
|
|
|
|
2015-06-27 23:33:21 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--enable-snmp"
|
|
|
|
"--enable-sha1"
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://keepalived.org;
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "Routing software written in C";
|
2015-06-27 23:33:21 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ wkennington ];
|
|
|
|
};
|
|
|
|
}
|