2016-04-20 17:11:34 +02:00
|
|
|
{ stdenv, lib, kernel, fetchurl }:
|
|
|
|
|
|
|
|
assert lib.versionAtLeast kernel.version "3.18";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "dpdk-${version}-${kernel.version}";
|
|
|
|
version = "16.04";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${version}.tar.gz";
|
|
|
|
sha256 = "0yrz3nnhv65v2jzz726bjswkn8ffqc1sr699qypc9m78qrdljcfn";
|
|
|
|
};
|
|
|
|
|
|
|
|
RTE_KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
|
|
RTE_TARGET = "x86_64-native-linuxapp-gcc";
|
|
|
|
|
2016-05-18 17:25:57 +02:00
|
|
|
# we need sse3 instructions to build
|
|
|
|
NIX_ENFORCE_NO_NATIVE = "0";
|
|
|
|
|
2016-04-20 17:11:34 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
outputs = [ "out" "examples" ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make T=x86_64-native-linuxapp-gcc config
|
|
|
|
make T=x86_64-native-linuxapp-gcc install
|
|
|
|
make T=x86_64-native-linuxapp-gcc examples
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-04-21 00:09:30 +02:00
|
|
|
mkdir $out
|
2016-04-20 17:11:34 +02:00
|
|
|
cp -pr x86_64-native-linuxapp-gcc/{app,lib,include,kmod} $out/
|
|
|
|
|
|
|
|
mkdir $examples
|
|
|
|
cp -pr examples/* $examples/
|
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|