blob: 4bd50fdae40f1cad96aa9c7e0260ec447b57451c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{ stdenv, lib, kernel, fetchurl, pkgconfig, libvirt }:
assert lib.versionAtLeast kernel.version "3.18";
stdenv.mkDerivation rec {
name = "dpdk-${version}-${kernel.version}";
version = "17.05.1";
src = fetchurl {
url = "http://fast.dpdk.org/rel/dpdk-${version}.tar.xz";
sha256 = "1w3nx5cqf8z600bdlbwz7brmdb5yn233qrqvv24kbmmxhbwp7qld";
};
nativeBuildInputs = [ pkgconfig ] ++ kernel.moduleBuildDependencies;
buildInputs = [ libvirt ];
RTE_KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
RTE_TARGET = "x86_64-native-linuxapp-gcc";
# we need sse3 instructions to build
NIX_CFLAGS_COMPILE = [ "-march=core2" ];
enableParallelBuilding = true;
outputs = [ "out" "kmod" ];
hardeningDisable = [ "pic" ];
configurePhase = ''
make T=${RTE_TARGET} config
'';
installPhase = ''
make install-runtime DESTDIR=$out prefix= includedir=/include datadir=/
make install-sdk DESTDIR=$out prefix= includedir=/include datadir=/
make install-kmod DESTDIR=$kmod
'';
meta = with stdenv.lib; {
description = "Set of libraries and drivers for fast packet processing";
homepage = http://dpdk.org/;
license = with licenses; [ lgpl21 gpl2 bsd2 ];
platforms = [ "x86_64-linux" ];
maintainers = [ maintainers.domenkozar ];
};
}
|