3
0
Fork 0
forked from mirrors/nixpkgs

pktgen: init at 3.0.00

This commit is contained in:
Ruslan Babayev 2016-06-01 16:41:25 -07:00
parent 49b985b241
commit 6d3fcd33d7
3 changed files with 41 additions and 0 deletions

View file

@ -11,6 +11,7 @@
abaldeau = "Andreas Baldeau <andreas@baldeau.net>";
abbradar = "Nikolay Amiantov <ab@fmap.me>";
aboseley = "Adam Boseley <adam.boseley@gmail.com>";
abuibrahim = "Ruslan Babayev <ruslan@babayev.com>";
adev = "Adrien Devresse <adev@adev.name>";
Adjective-Object = "Maxwell Huang-Hobbs <mhuan13@gmail.com>";
adnelson = "Allen Nelson <ithinkican@gmail.com>";

View file

@ -0,0 +1,38 @@
{ stdenv, fetchurl, dpdk, libpcap, utillinux }:
stdenv.mkDerivation rec {
name = "pktgen-${version}";
version = "3.0.00";
src = fetchurl {
url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-${version}.tar.gz";
sha256 = "703f8bd615aa4ae3a3085055483f9889dda09d082abb58afd33c1ba7c766ea65";
};
buildInputs = [ dpdk libpcap ];
RTE_SDK = "${dpdk}";
RTE_TARGET = "x86_64-native-linuxapp-gcc";
enableParallelBuilding = true;
patchPhase = ''
sed -i -e s:/usr/local:$out:g lib/lua/src/luaconf.h
sed -i -e s:/usr/bin/lscpu:${utillinux}/bin/lscpu:g lib/common/wr_lscpu.h
'';
installPhase = ''
install -d $out/bin
install -m 0755 app/app/${RTE_TARGET}/app/pktgen $out/bin
install -d $out/lib/lua/5.3
install -m 0644 Pktgen.lua $out/lib/lua/5.3
'';
meta = with stdenv.lib; {
description = "Traffic generator powered by DPDK";
homepage = http://dpdk.org/;
license = licenses.bsdOriginal;
platforms = [ "x86_64-linux" ];
maintainers = [ maintainers.abuibrahim ];
};
}

View file

@ -10844,6 +10844,8 @@ in
dpdk = callPackage ../os-specific/linux/dpdk { };
pktgen = callPackage ../os-specific/linux/pktgen { };
e1000e = callPackage ../os-specific/linux/e1000e {};
v4l2loopback = callPackage ../os-specific/linux/v4l2loopback { };