2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, libnl, popt, gnugrep }:
|
2018-01-24 17:36:50 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "ipvsadm";
|
2020-01-06 20:05:11 +01:00
|
|
|
version = "1.31";
|
2018-01-24 17:36:50 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "mirror://kernel/linux/utils/kernel/ipvsadm/${pname}-${version}.tar.xz";
|
2020-01-06 20:05:11 +01:00
|
|
|
sha256 = "1nyzpv1hx75k9lh0vfxfhc0p2fpqaqb38xpvs8sn88m1nljmw2hs";
|
2018-01-24 17:36:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile --replace "-lnl" "$(pkg-config --libs libnl-genl-3.0)"
|
|
|
|
'';
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-01-24 17:36:50 +01:00
|
|
|
buildInputs = [ libnl popt ];
|
|
|
|
|
|
|
|
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}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-01-24 17:36:50 +01:00
|
|
|
description = "Linux Virtual Server support programs";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.linuxvirtualserver.org/software/ipvs.html";
|
2018-01-24 17:36:50 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|