diff options
author | Orivej Desh <orivej@gmx.fr> | 2019-12-23 07:17:02 +0000 |
---|---|---|
committer | Orivej Desh <orivej@gmx.fr> | 2019-12-30 16:50:41 +0000 |
commit | 140ab69ae6efe2c555cfb7fd8c6a52f4d14bc9cb (patch) | |
tree | 5c9969d952c86a8c05d89bdb3992943a194d8859 /pkgs/os-specific/linux/pktgen/default.nix | |
parent | fdb16f3a77fb9eca4c886abfd6f4492f9fd538bb (diff) | |
download | nixpkgs-140ab69ae6efe2c555cfb7fd8c6a52f4d14bc9cb.tar nixpkgs-140ab69ae6efe2c555cfb7fd8c6a52f4d14bc9cb.tar.gz nixpkgs-140ab69ae6efe2c555cfb7fd8c6a52f4d14bc9cb.tar.bz2 nixpkgs-140ab69ae6efe2c555cfb7fd8c6a52f4d14bc9cb.tar.lz nixpkgs-140ab69ae6efe2c555cfb7fd8c6a52f4d14bc9cb.tar.xz nixpkgs-140ab69ae6efe2c555cfb7fd8c6a52f4d14bc9cb.tar.zst nixpkgs-140ab69ae6efe2c555cfb7fd8c6a52f4d14bc9cb.zip |
pktgen: 3.7.2 -> 19.12.0, build with meson, fix build
Building with make requires share/dpdk/mk/ from the make build of dpdk, which is not installed by the meson build of dpdk.
Diffstat (limited to 'pkgs/os-specific/linux/pktgen/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/pktgen/default.nix | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/pkgs/os-specific/linux/pktgen/default.nix b/pkgs/os-specific/linux/pktgen/default.nix index fd57fa6e37c..171e5d3b43a 100644 --- a/pkgs/os-specific/linux/pktgen/default.nix +++ b/pkgs/os-specific/linux/pktgen/default.nix @@ -1,41 +1,40 @@ -{ stdenv, lib, fetchurl, pkgconfig -, dpdk, libpcap, lua5_3, numactl, utillinux +{ stdenv, lib, fetchurl, meson, ninja, pkgconfig +, dpdk, libbsd, libpcap, lua5_3, numactl, utillinux , gtk2, which, withGtk ? false }: stdenv.mkDerivation rec { pname = "pktgen"; - version = "3.7.2"; + version = "19.12.0"; src = fetchurl { url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/${pname}-${version}.tar.xz"; - sha256 = "03k7h4j2lsrh6b7477hgn87ljrjh2673ncffx9v261bx1ns54y7w"; + sha256 = "1clfviz1qa4hysslcg6i29vsxwl9f6j1y7zf9wwx9br3yq08x956"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ meson ninja pkgconfig ]; buildInputs = - [ dpdk libpcap lua5_3 numactl which ] + [ dpdk libbsd libpcap lua5_3 numactl which ] ++ stdenv.lib.optionals withGtk [gtk2]; - RTE_SDK = "${dpdk}/share/dpdk"; - RTE_TARGET = "x86_64-native-linuxapp-gcc"; + RTE_SDK = dpdk; GUI = stdenv.lib.optionalString withGtk "true"; NIX_CFLAGS_COMPILE = [ "-msse3" ]; - postPatch = let dpdkMajor = lib.versions.major dpdk.version; in '' + patches = [ ./configure.patch ]; + + postPatch = '' substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu ''; - installPhase = '' - install -d $out/bin - install -m 0755 app/${RTE_TARGET}/pktgen $out/bin - install -m 0644 Pktgen.lua $out/bin + postInstall = '' + # meson installs unneeded files with conflicting generic names, such as + # include/cli.h and lib/liblua.so. + rm -rf $out/include $out/lib ''; - enableParallelBuilding = true; - meta = with stdenv.lib; { description = "Traffic generator powered by DPDK"; homepage = http://dpdk.org/; |