2022-10-31 13:40:48 +01:00
|
|
|
{ lib, stdenv, fetchzip, fetchpatch, kernel }:
|
2021-06-07 13:46:07 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dpdk-kmods";
|
2022-10-31 13:40:48 +01:00
|
|
|
version = "2022-08-29";
|
2021-06-07 13:46:07 +02:00
|
|
|
|
|
|
|
src = fetchzip {
|
2022-10-31 13:40:48 +01:00
|
|
|
url = "https://git.dpdk.org/dpdk-kmods/snapshot/dpdk-kmods-4a589f7bed00fc7009c93d430bd214ac7ad2bb6b.tar.xz";
|
|
|
|
sha256 = "sha256-l9asJuw2nl63I1BxK6udy2pNunRiMJxyoXeg9V5+WgI=";
|
2021-06-07 13:46:07 +02:00
|
|
|
};
|
|
|
|
|
2022-10-31 13:40:48 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://git.launchpad.net/ubuntu/+source/dpdk-kmods/plain/debian/patches/0001-support-linux-5.18.patch?id=9d628c02c169d8190bc2cb6afd81e4d364c382cd";
|
|
|
|
sha256 = "sha256-j4kpx1DOnmf5lFxOhaVFNT7prEy1jrJERX2NFaybTPU=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-06-07 13:46:07 +02:00
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2022-02-10 02:51:58 +01:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
|
|
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
|
|
|
];
|
2021-06-07 13:46:07 +02:00
|
|
|
KSRC = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
preBuild = "cd linux/igb_uio";
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-02-10 02:51:58 +01:00
|
|
|
make -C ${KSRC} M=$(pwd) modules_install $makeFlags
|
2021-06-07 13:46:07 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Kernel modules for DPDK";
|
|
|
|
homepage = "https://git.dpdk.org/dpdk-kmods/";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|