blob: c6447e9a9b57815aca0cb4f5bfdd1bdcde826da7 (
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
40
41
|
{ lib, stdenv, fetchurl, pkg-config, libnl, popt, gnugrep }:
stdenv.mkDerivation rec {
pname = "ipvsadm";
version = "1.31";
src = fetchurl {
url = "mirror://kernel/linux/utils/kernel/ipvsadm/${pname}-${version}.tar.xz";
sha256 = "1nyzpv1hx75k9lh0vfxfhc0p2fpqaqb38xpvs8sn88m1nljmw2hs";
};
postPatch = ''
substituteInPlace Makefile --replace "-lnl" "$(pkg-config --libs libnl-genl-3.0)"
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libnl popt ];
# Disable parallel build, errors:
# *** No rule to make target 'libipvs/libipvs.a', needed by 'ipvsadm'. Stop.
enableParallelBuilding = false;
preBuild = ''
makeFlagsArray+=(
INCLUDE=$(pkg-config --cflags libnl-genl-3.0)
BUILD_ROOT=$out
MANDIR=share/man
)
'';
postInstall = ''
sed -i -e "s|^PATH=.*|PATH=$out/bin:${gnugrep}/bin|" $out/sbin/ipvsadm-{restore,save}
'';
meta = with lib; {
description = "Linux Virtual Server support programs";
homepage = "http://www.linuxvirtualserver.org/software/ipvs.html";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}
|