lol

Merge #185559: xdp-tools: init at 1.2.5

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