blob: 1d0c9d55076e536f37c3894ba4aa0d50abaeab1e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{ stdenv, fetchurl, openssl, net_snmp, libnl }:
stdenv.mkDerivation rec {
name = "keepalived-1.2.19";
src = fetchurl {
url = "http://keepalived.org/software/${name}.tar.gz";
sha256 = "0lrq963pxhgh74qmxjyy5hvxdfpm4r50v4vsrp559n0w5irsxyrj";
};
buildInputs = [ openssl net_snmp libnl ];
postPatch = ''
sed -i 's,$(DESTDIR)/usr/share,$out/share,g' Makefile.in
'';
# It doesn't know about the include/libnl<n> directory
NIX_CFLAGS_COMPILE="-I${libnl.dev}/include/libnl3";
NIX_LDFLAGS="-lnl-3 -lnl-genl-3";
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 ];
};
}
|