tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
Merge #185559: xdp-tools: init at 1.2.5
Vladimír Čunát
3 years ago
72248c9e
5cd66a72
+90
3 changed files
expand all
collapse all
unified
split
maintainers
maintainer-list.nix
pkgs
tools
networking
xdp-tools
default.nix
top-level
all-packages.nix
+6
maintainers/maintainer-list.nix
···
13420
13420
githubId = 1292007;
13421
13421
name = "Sébastien Maccagnoni";
13422
13422
};
13423
13423
+
tirex = {
13424
13424
+
email = "szymon@kliniewski.pl";
13425
13425
+
name = "Szymon Kliniewski";
13426
13426
+
github = "NoneTirex";
13427
13427
+
githubId = 26038207;
13428
13428
+
};
13423
13429
titanous = {
13424
13430
email = "jonathan@titanous.com";
13425
13431
github = "titanous";
+80
pkgs/tools/networking/xdp-tools/default.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, fetchFromGitHub
4
4
+
, fetchpatch
5
5
+
, libbpf
6
6
+
, elfutils
7
7
+
, zlib
8
8
+
, libpcap
9
9
+
, llvmPackages
10
10
+
, pkg-config
11
11
+
, m4
12
12
+
, emacs-nox
13
13
+
, wireshark-cli
14
14
+
, nukeReferences
15
15
+
}:
16
16
+
stdenv.mkDerivation rec {
17
17
+
pname = "xdp-tools";
18
18
+
version = "1.2.6";
19
19
+
20
20
+
src = fetchFromGitHub {
21
21
+
owner = "xdp-project";
22
22
+
repo = "xdp-tools";
23
23
+
rev = "v${version}";
24
24
+
sha256 = "xKxR20Jz+pGKzazFoZe0i0pv7AuaxdL8Yt3IE4JAje8=";
25
25
+
};
26
26
+
27
27
+
outputs = [ "out" "lib" ];
28
28
+
29
29
+
patches = [
30
30
+
(fetchpatch {
31
31
+
# Compat with libbpf 1.0: https://github.com/xdp-project/xdp-tools/pull/221
32
32
+
url = "https://github.com/xdp-project/xdp-tools/commit/f8592d0609807f5b2b73d27eb3bd623da4bd1997.diff";
33
33
+
sha256 = "+NpR0d5YE1TMFeyidBuXCDkcBTa2W0094nqYiEWKpY4=";
34
34
+
})
35
35
+
];
36
36
+
37
37
+
buildInputs = [
38
38
+
libbpf
39
39
+
elfutils
40
40
+
libpcap
41
41
+
zlib
42
42
+
];
43
43
+
44
44
+
nativeBuildInputs = [
45
45
+
llvmPackages.clang
46
46
+
llvmPackages.llvm
47
47
+
pkg-config
48
48
+
m4
49
49
+
emacs-nox # to generate man pages from .org
50
50
+
nukeReferences
51
51
+
];
52
52
+
checkInputs = [
53
53
+
wireshark-cli # for tshark
54
54
+
];
55
55
+
56
56
+
# When building BPF, the default CC wrapper is interfering a bit too much.
57
57
+
BPF_CFLAGS = "-fno-stack-protector -Wno-error=unused-command-line-argument";
58
58
+
59
59
+
PRODUCTION = 1;
60
60
+
DYNAMIC_LIBXDP = 1;
61
61
+
FORCE_SYSTEM_LIBBPF = 1;
62
62
+
FORCE_EMACS = 1;
63
63
+
64
64
+
makeFlags = [ "PREFIX=$(out)" "LIBDIR=$(lib)/lib" ];
65
65
+
66
66
+
postInstall = ''
67
67
+
# Note that even the static libxdp would refer to BPF_OBJECT_DIR ?=$(LIBDIR)/bpf
68
68
+
rm "$lib"/lib/*.a
69
69
+
# Drop unfortunate references to glibc.dev/include at least from $lib
70
70
+
nuke-refs "$lib"/lib/bpf/*.o
71
71
+
'';
72
72
+
73
73
+
meta = with lib; {
74
74
+
homepage = "https://github.com/xdp-project/xdp-tools";
75
75
+
description = "Library and utilities for use with XDP";
76
76
+
license = with licenses; [ gpl2 lgpl21 bsd2 ];
77
77
+
maintainers = with maintainers; [ tirex vcunat ];
78
78
+
platforms = platforms.linux;
79
79
+
};
80
80
+
}
+4
pkgs/top-level/all-packages.nix
···
12378
12378
12379
12379
xdg-launch = callPackage ../applications/misc/xdg-launch { };
12380
12380
12381
12381
+
xdp-tools = callPackage ../tools/networking/xdp-tools {
12382
12382
+
llvmPackages = llvmPackages_14;
12383
12383
+
};
12384
12384
+
12381
12385
xkbvalidate = callPackage ../tools/X11/xkbvalidate { };
12382
12386
12383
12387
xkeysnail = callPackage ../tools/X11/xkeysnail { };