Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15919 from abuibrahim/master
dpdk: refactor to allow building extapps
- Loading branch information
Showing
4 changed files
with
69 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters