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