nixpkgs-suyu/pkgs/tools/networking/keepalived/default.nix

43 lines
1,006 B
Nix
Raw Normal View History

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 {
name = "keepalived-1.2.17";
src = fetchurl {
url = "http://keepalived.org/software/${name}.tar.gz";
sha256 = "1w7px8phx3pyb3b56m3nz1a9ncx26q34fgy8j4n2dpi284jmqm6z";
};
2015-06-28 04:59:44 +02:00
buildInputs = [ openssl net_snmp libnl ];
2015-06-27 23:33:21 +02:00
2015-06-28 08:19:05 +02:00
# Remove in 1.2.18
patches = [ ./fix-ip-release.patch ];
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
NIX_CFLAGS_COMPILE="-I${libnl}/include/libnl3";
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;
description = "routing software written in C";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ wkennington ];
};
}