2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config
|
2021-05-28 09:39:13 +00:00
|
|
|
, dpdk, libbpf, libconfig, libpcap, numactl, openssl, zlib, libbsd, libelf, jansson
|
2020-04-24 23:36:52 +00:00
|
|
|
}: let
|
2021-05-28 09:39:13 +00:00
|
|
|
dpdk_19_11 = dpdk.overrideAttrs (old: rec {
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "19.11.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz";
|
2022-05-18 14:49:53 +00:00
|
|
|
sha256 = "sha256-F9m2+MZi3n0psPIwjWwhiIbbNkoGlxqtru2OlV7TbzQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-07-24 12:14:16 +00:00
|
|
|
mesonFlags = old.mesonFlags ++ [
|
|
|
|
"-Denable_docs=false"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "odp-dpdk";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.37.0.0_DPDK_19.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://git.linaro.org/lng/odp-dpdk.git/snapshot/${pname}-${version}.tar.gz";
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "sha256-Ai6+6eZJeG0BrwNboBPfgDGkUbCC8lcj7+oxmWjWP2k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2023-02-16 17:41:37 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-05-28 09:39:13 +00:00
|
|
|
dpdk_19_11
|
2020-04-24 23:36:52 +00:00
|
|
|
libconfig
|
|
|
|
libpcap
|
|
|
|
numactl
|
|
|
|
openssl
|
|
|
|
zlib
|
|
|
|
libbsd
|
|
|
|
libelf
|
|
|
|
jansson
|
2021-05-28 09:39:13 +00:00
|
|
|
libbpf
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [
|
|
|
|
# Needed with GCC 12
|
|
|
|
"-Wno-error=maybe-uninitialized"
|
|
|
|
"-Wno-error=uninitialized"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# binaries will segfault otherwise
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open Data Plane optimized for DPDK";
|
|
|
|
homepage = "https://www.opendataplane.org";
|
|
|
|
license = licenses.bsd3;
|
2022-05-18 14:49:53 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.abuibrahim ];
|
|
|
|
};
|
|
|
|
}
|