1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 15:41:40 +00:00
nixpkgs/pkgs/os-specific/linux/dpdk/default.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

2018-05-19 11:38:03 +01:00
{ stdenv, kernel, fetchurl, pkgconfig, numactl }:
stdenv.mkDerivation rec {
name = "dpdk-${version}-${kernel.version}";
2018-05-19 11:38:03 +01:00
version = "17.11.2";
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";
};
nativeBuildInputs = [ pkgconfig ] ++ kernel.moduleBuildDependencies;
2018-05-19 11:38:03 +01:00
buildInputs = [ numactl ];
RTE_KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
RTE_TARGET = "x86_64-native-linuxapp-gcc";
# we need sse3 instructions to build
2018-05-19 11:38:03 +01:00
NIX_CFLAGS_COMPILE = [ "-msse3" ];
enableParallelBuilding = true;
outputs = [ "out" "kmod" ];
hardeningDisable = [ "pic" ];
configurePhase = ''
make T=${RTE_TARGET} config
'';
installPhase = ''
2017-09-12 21:23:36 +01:00
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 ];
2016-04-20 23:38:52 +01:00
platforms = [ "x86_64-linux" ];
maintainers = [ maintainers.domenkozar ];
};
}