tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
pktgen: 19.12.0 -> 21.05.0
Jörg Thalheim
4 years ago
9d002b11
00a7a0f6
+14
-27
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
pktgen
configure.patch
default.nix
-17
pkgs/os-specific/linux/pktgen/configure.patch
···
1
1
-
1. librte_process_info does not exist.
2
2
-
2. lua5.3 library is liblua.
3
3
-
3. app/meson.build uses undeclared drivers_install_subdir.
4
4
-
--- a/lib/common/meson.build
5
5
-
+++ b/lib/common/meson.build
6
6
-
@@ -34,1 +34,1 @@
7
7
-
-libs = ['eal', 'kvargs', 'cmdline', 'process_info']
8
8
-
+libs = ['eal', 'kvargs', 'cmdline']
9
9
-
--- a/lib/lua/meson.build
10
10
-
+++ b/lib/lua/meson.build
11
11
-
@@ -31 +31 @@ endforeach
12
12
-
-ext_deps += cc.find_library('lua5.3', required: true)
13
13
-
+ext_deps += cc.find_library('lua', required: true)
14
14
-
--- a/meson_options.txt
15
15
-
+++ b/meson_options.txt
16
16
-
@@ -0,0 +1,1 @@
17
17
-
+option('drivers_install_subdir', type: 'string', value: '')
+14
-10
pkgs/os-specific/linux/pktgen/default.nix
···
1
1
-
{ stdenv, lib, fetchurl, meson, ninja, pkg-config
1
1
+
{ stdenv, lib, fetchFromGitHub, meson, ninja, pkg-config
2
2
, dpdk, libbsd, libpcap, lua5_3, numactl, util-linux
3
3
, gtk2, which, withGtk ? false
4
4
}:
5
5
6
6
stdenv.mkDerivation rec {
7
7
pname = "pktgen";
8
8
-
version = "19.12.0";
8
8
+
version = "21.05.0";
9
9
10
10
-
src = fetchurl {
11
11
-
url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/${pname}-${version}.tar.xz";
12
12
-
sha256 = "1clfviz1qa4hysslcg6i29vsxwl9f6j1y7zf9wwx9br3yq08x956";
10
10
+
src = fetchFromGitHub {
11
11
+
owner = "pktgen";
12
12
+
repo = "Pktgen-DPDK";
13
13
+
rev = "pktgen-${version}";
14
14
+
sha256 = "sha256-7lLDtbd14olEHO+1BuI6KTEUNRM/zAyRXau/OZbYbGA=";
13
15
};
14
16
15
17
nativeBuildInputs = [ meson ninja pkg-config ];
16
18
17
17
-
buildInputs =
18
18
-
[ dpdk libbsd libpcap lua5_3 numactl which ]
19
19
-
++ lib.optionals withGtk [gtk2];
19
19
+
buildInputs = [
20
20
+
dpdk libbsd libpcap lua5_3 numactl which
21
21
+
] ++ lib.optionals withGtk [
22
22
+
gtk2
23
23
+
];
20
24
21
25
RTE_SDK = dpdk;
22
26
GUI = lib.optionalString withGtk "true";
23
27
24
28
NIX_CFLAGS_COMPILE = "-msse3";
25
25
-
26
26
-
patches = [ ./configure.patch ];
29
29
+
# requires symbols from this file
30
30
+
NIX_LDFLAGS = "-lrte_net_bond";
27
31
28
32
postPatch = ''
29
33
substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${util-linux}/bin/lscpu