diff options
Diffstat (limited to 'pkgs/os-specific/linux/pktgen/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/pktgen/default.nix | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/pkgs/os-specific/linux/pktgen/default.nix b/pkgs/os-specific/linux/pktgen/default.nix index 41db6e93661..5a1a56ab691 100644 --- a/pkgs/os-specific/linux/pktgen/default.nix +++ b/pkgs/os-specific/linux/pktgen/default.nix @@ -1,32 +1,36 @@ -{ stdenv, lib, fetchurl, meson, ninja, pkgconfig -, dpdk, libbsd, libpcap, lua5_3, numactl, utillinux +{ stdenv, lib, fetchFromGitHub, meson, ninja, pkg-config +, dpdk, libbsd, libpcap, lua5_3, numactl, util-linux , gtk2, which, withGtk ? false }: stdenv.mkDerivation rec { pname = "pktgen"; - version = "19.12.0"; + version = "21.05.0"; - src = fetchurl { - url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/${pname}-${version}.tar.xz"; - sha256 = "1clfviz1qa4hysslcg6i29vsxwl9f6j1y7zf9wwx9br3yq08x956"; + src = fetchFromGitHub { + owner = "pktgen"; + repo = "Pktgen-DPDK"; + rev = "pktgen-${version}"; + sha256 = "sha256-7lLDtbd14olEHO+1BuI6KTEUNRM/zAyRXau/OZbYbGA="; }; - nativeBuildInputs = [ meson ninja pkgconfig ]; + nativeBuildInputs = [ meson ninja pkg-config ]; - buildInputs = - [ dpdk libbsd libpcap lua5_3 numactl which ] - ++ stdenv.lib.optionals withGtk [gtk2]; + buildInputs = [ + dpdk libbsd libpcap lua5_3 numactl which + ] ++ lib.optionals withGtk [ + gtk2 + ]; RTE_SDK = dpdk; - GUI = stdenv.lib.optionalString withGtk "true"; + GUI = lib.optionalString withGtk "true"; NIX_CFLAGS_COMPILE = "-msse3"; - - patches = [ ./configure.patch ]; + # requires symbols from this file + NIX_LDFLAGS = "-lrte_net_bond"; postPatch = '' - substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu + substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${util-linux}/bin/lscpu ''; postInstall = '' @@ -35,7 +39,7 @@ stdenv.mkDerivation rec { rm -rf $out/include $out/lib ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Traffic generator powered by DPDK"; homepage = "http://dpdk.org/"; license = licenses.bsdOriginal; |