25 # FIXME: broken: af_xdp plugins - no working libbpf found - af_xdp plugin disabled
30 dpdk' = dpdk.overrideAttrs (old: {
31 mesonFlags = old.mesonFlags ++ [ "-Denable_driver_sdk=true" ];
34 rdma-core' = rdma-core.overrideAttrs (old: {
35 cmakeFlags = old.cmakeFlags ++ [
37 "-DBUILD_SHARED_LIBS:BOOL=false"
41 xdp-tools' = xdp-tools.overrideAttrs (old: {
43 dontDisableStatic = true;
46 stdenv.mkDerivation rec {
50 src = fetchFromGitHub {
54 hash = "sha256-AbdtH3ha/Bzj9tAkp4OhjRcUZilUEt+At0LukWN2LJU=";
58 patchShebangs scripts/
59 substituteInPlace CMakeLists.txt \
60 --replace "plugins tools/vppapigen tools/g2 tools/perftool cmake pkg" \
61 "plugins tools/vppapigen tools/g2 tools/perftool cmake"
65 echo "${version}-nixos" > scripts/.version
70 patchShebangs ../tools/
71 patchShebangs ../vpp-api/
74 sourceRoot = "source/src";
76 enableParallelBuilding = true;
77 env.NIX_CFLAGS_COMPILE = "-Wno-error -Wno-array-bounds -Wno-maybe-uninitialized";
80 "-DVPP_PLATFORM=default"
81 "-DVPP_LIBRARY_DIR=lib"
82 ] ++ lib.optional enableDpdk "-DVPP_USE_SYSTEM_DPDK=ON";
87 ] ++ lib.optional enableDpdk dpdk' ++ lib.optional enableRdma rdma-core'.dev;
93 (python3.withPackages (ps: [ ps.ply ]))
96 mbedtls_2 # tlsmbed plugin
97 libpcap # bpf_trace_filter plugin
103 ++ lib.optionals enableDpdk [
109 ++ lib.optionals enableAfXdp [
116 passthru.updateScript = nix-update-script { };
119 description = "Fast, scalable layer 2-4 multi-platform network stack running in user space";
120 homepage = "https://s3-docs.fd.io/vpp/${version}/";
121 license = [ lib.licenses.asl20 ];
122 maintainers = with lib.maintainers; [ romner-set ];
124 platforms = lib.platforms.linux;