nixpkgs-suyu/pkgs/os-specific/linux/odp-dpdk/default.nix

57 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, autoreconfHook, pkgconfig
, dpdk, libconfig, libpcap, numactl, openssl, zlib, libbsd, libelf, jansson
2019-08-07 08:05:34 +02:00
}: let
dpdk_18_11 = dpdk.overrideAttrs (old: rec {
version = "18.11.5";
2019-08-07 08:05:34 +02:00
src = fetchurl {
url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz";
sha256 = "0000000000000000000000000000000000000000000000000000";
2019-08-07 08:05:34 +02:00
};
});
in stdenv.mkDerivation rec {
pname = "odp-dpdk";
version = "1.22.0.0_DPDK_18.11";
src = fetchurl {
url = "https://git.linaro.org/lng/odp-dpdk.git/snapshot/${pname}-${version}.tar.gz";
sha256 = "1m8xhmfjqlj2gkkigq5ka3yh0xgzrcpfpaxp1pnh8d1g99094vbx";
};
nativeBuildInputs = [
autoreconfHook
pkgconfig
];
buildInputs = [
dpdk_18_11
libconfig
libpcap
numactl
openssl
zlib
libbsd
libelf
jansson
];
# for some reason, /build/odp-dpdk-1.22.0.0_DPDK_18.11/lib/.libs ends up in all binaries,
# while it should be $out/lib instead.
# prepend rpath with the proper location, the /build will get removed during rpath shrinking
preFixup = ''
for prog in $out/bin/*; do
patchelf --set-rpath $out/lib:`patchelf --print-rpath $prog` $prog
done
'';
# binaries will segfault otherwise
dontStrip = true;
2017-09-08 02:56:13 +02:00
meta = with stdenv.lib; {
description = "Open Data Plane optimized for DPDK";
2018-06-23 13:34:55 +02:00
homepage = https://www.opendataplane.org;
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = [ maintainers.abuibrahim ];
};
}