2016-06-02 01:30:25 +02:00
|
|
|
{ stdenv, lib, kernel, fetchurl, pkgconfig, libvirt }:
|
2016-04-20 17:11:34 +02:00
|
|
|
|
|
|
|
assert lib.versionAtLeast kernel.version "3.18";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "dpdk-${version}-${kernel.version}";
|
2017-07-23 17:40:25 +02:00
|
|
|
version = "17.05.1";
|
2016-04-20 17:11:34 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-01-01 01:22:52 +01:00
|
|
|
url = "http://fast.dpdk.org/rel/dpdk-${version}.tar.xz";
|
2017-07-23 17:40:25 +02:00
|
|
|
sha256 = "1w3nx5cqf8z600bdlbwz7brmdb5yn233qrqvv24kbmmxhbwp7qld";
|
2016-04-20 17:11:34 +02:00
|
|
|
};
|
|
|
|
|
2016-06-02 01:30:25 +02:00
|
|
|
buildInputs = [ pkgconfig libvirt ];
|
|
|
|
|
2016-04-20 17:11:34 +02:00
|
|
|
RTE_KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
|
|
RTE_TARGET = "x86_64-native-linuxapp-gcc";
|
|
|
|
|
2016-06-29 10:34:17 +02:00
|
|
|
# we need sse3 instructions to build
|
2016-05-19 12:52:52 +02:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-march=core2" ];
|
2016-05-18 17:25:57 +02:00
|
|
|
|
2016-04-20 17:11:34 +02:00
|
|
|
enableParallelBuilding = true;
|
2017-09-09 03:28:54 +02:00
|
|
|
outputs = [ "out" "kmod" ];
|
2016-04-20 17:11:34 +02:00
|
|
|
|
2016-05-31 14:35:54 +02:00
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2016-06-29 10:34:17 +02:00
|
|
|
configurePhase = ''
|
2017-09-09 03:28:54 +02:00
|
|
|
make T=${RTE_TARGET} config
|
2016-04-20 17:11:34 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2017-09-09 03:28:54 +02:00
|
|
|
make install-runtime install-sdk DESTDIR=$out prefix= includedir=/include datadir=/
|
|
|
|
make install-sdk DESTDIR=$out prefix= includedir=/include datadir=/
|
|
|
|
make install-kmod DESTDIR=$kmod
|
2016-04-20 17:11:34 +02: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-21 00:38:52 +02:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2016-05-17 13:57:28 +02:00
|
|
|
maintainers = [ maintainers.domenkozar ];
|
2016-04-20 17:11:34 +02:00
|
|
|
};
|
|
|
|
}
|