From f9238bf19fd4d6321b4e947837bebb67bd5b6f52 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 24 Jan 2018 10:36:50 -0600 Subject: [PATCH] ipvsadm: init at 1.29 Fixes #34226. --- pkgs/os-specific/linux/ipvsadm/default.nix | 37 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/os-specific/linux/ipvsadm/default.nix diff --git a/pkgs/os-specific/linux/ipvsadm/default.nix b/pkgs/os-specific/linux/ipvsadm/default.nix new file mode 100644 index 000000000000..0e99dd976c72 --- /dev/null +++ b/pkgs/os-specific/linux/ipvsadm/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, pkgconfig, libnl, popt, gnugrep }: + +stdenv.mkDerivation rec { + name = "ipvsadm-${version}"; + version = "1.29"; + + src = fetchurl { + url = "mirror://kernel/linux/utils/kernel/ipvsadm/${name}.tar.xz"; + sha256 = "c3de4a21d90a02c621f0c72ee36a7aa27374b6f29fd4178f33fbf71b4c66c149"; + }; + + postPatch = '' + substituteInPlace Makefile --replace "-lnl" "$(pkg-config --libs libnl-genl-3.0)" + ''; + + nativeBuildInputs = [ pkgconfig ]; + 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} + ''; + + meta = with stdenv.lib; { + description = "Linux Virtual Server support programs"; + homepage = http://www.linuxvirtualserver.org/software/ipvs.html; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0b24c98499cb..3b46a7776aba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1225,6 +1225,8 @@ with pkgs; iio-sensor-proxy = callPackage ../os-specific/linux/iio-sensor-proxy { }; + ipvsadm = callPackage ../os-specific/linux/ipvsadm { }; + lynis = callPackage ../tools/security/lynis { }; mathics = pythonPackages.mathics;