2016-06-01 23:30:25 +00:00
|
|
|
{ stdenv, lib, kernel, fetchurl, pkgconfig, libvirt }:
|
2016-04-20 15:11:34 +00:00
|
|
|
|
|
|
|
assert lib.versionAtLeast kernel.version "3.18";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "dpdk-${version}-${kernel.version}";
|
2017-07-23 15:40:25 +00:00
|
|
|
version = "17.05.1";
|
2016-04-20 15:11:34 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-01-01 00:22:52 +00:00
|
|
|
url = "http://fast.dpdk.org/rel/dpdk-${version}.tar.xz";
|
2017-07-23 15:40:25 +00:00
|
|
|
sha256 = "1w3nx5cqf8z600bdlbwz7brmdb5yn233qrqvv24kbmmxhbwp7qld";
|
2016-04-20 15:11:34 +00:00
|
|
|
};
|
|
|
|
|
2018-01-07 21:27:44 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ] ++ kernel.moduleBuildDependencies;
|
2017-09-05 21:26:13 +00:00
|
|
|
buildInputs = [ libvirt ];
|
2016-06-01 23:30:25 +00:00
|
|
|
|
2016-04-20 15:11:34 +00:00
|
|
|
RTE_KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
|
|
RTE_TARGET = "x86_64-native-linuxapp-gcc";
|
|
|
|
|
2016-06-29 08:34:17 +00:00
|
|
|
# we need sse3 instructions to build
|
2016-05-19 10:52:52 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-march=core2" ];
|
2016-05-18 15:25:57 +00:00
|
|
|
|
2016-04-20 15:11:34 +00:00
|
|
|
enableParallelBuilding = true;
|
2017-09-09 01:28:54 +00:00
|
|
|
outputs = [ "out" "kmod" ];
|
2016-04-20 15:11:34 +00:00
|
|
|
|
2016-05-31 12:35:54 +00:00
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2016-06-29 08:34:17 +00:00
|
|
|
configurePhase = ''
|
2017-09-09 01:28:54 +00:00
|
|
|
make T=${RTE_TARGET} config
|
2016-04-20 15:11:34 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2017-09-12 20:23:36 +00:00
|
|
|
make install-runtime DESTDIR=$out prefix= includedir=/include datadir=/
|
2017-09-09 01:28:54 +00:00
|
|
|
make install-sdk DESTDIR=$out prefix= includedir=/include datadir=/
|
|
|
|
make install-kmod DESTDIR=$kmod
|
2016-04-20 15:11:34 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Set of libraries and drivers for fast packet processing";
|
|
|
|
homepage = http://dpdk.org/;
|
|
|
|
license = with licenses; [ lgpl21 gpl2 bsd2 ];
|
2016-04-20 22:38:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2016-05-17 11:57:28 +00:00
|
|
|
maintainers = [ maintainers.domenkozar ];
|
2016-04-20 15:11:34 +00:00
|
|
|
};
|
|
|
|
}
|